bas7advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
PAINT Statement Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
PAINT fills a graphics area with the color or pattern specified.
PAINT [STEP] (x!,y!)[,[paint] [,[bordercolor&] [,background$]]]
■ The coordinates (x!,y!) must be inside or outside of a figure, not
on the border itself. If this point is inside, the figure's interior
is painted; if the point is on the outside, the background is painted.
■ If the paint argument is a numeric expression, the number must be a
valid color attribute. If you do not specify paint, the foreground
color attribute is used. For information about valid colors, numbers,
and attributes see the following:
◄COLOR Statement Details►,
◄SCREEN Statement Details►, and
◄PALETTE, PALETTE USING Statements Details►.
■ If the paint argument is a string expression, the PAINT statement
"tiles," a process that paints a pattern rather than a solid color.
Tiling is similar to "line styling," which creates dashed lines
rather than solid lines.
■ The argument bordercolor& is a numeric expression identifying the
color attribute to use to paint the border of the figure. When the
border color is encountered, painting of the current line stops.
If the bordercolor is not specified, the paint argument is used.
■ The argument background$ is a string value giving the "background
tile slice" to skip when checking for termination of the boundary.
Painting is terminated when adjacent points display the paint color.
Specifying a background tile slice allows you to paint over an already
painted area. When you omit background$ the default is CHR$ (0).
Usage Notes
■ Painting is complete when a line is painted without changing the
color of any pixel; in other words, when the entire line is equal
to the paint color. The PAINT statement permits coordinates outside
the screen or viewport.
■ Tiling also can be done to produce various patterns of different colors.
"Tiling" is the design of a PAINT pattern represented in string form.
The tile string is eight bits wide and up to 64 bytes long. Each
byte masks eight bits along the x axis when plotting points. The
syntax for constructing the tile mask is:
A$ = CHR$(arg1)+CHR$(arg2)+...+CHR$(argn)
PAINT (x,y), A$
The arguments to CHR$ are numbers between 0 and 255, represented in
binary form across the x axis of the tile. There can be up to 64 of
these CHR$ elements; each generates an image not of the assigned
character, but of the bit arrangement of the code for that character.
For example, the decimal number 85 is binary 01010101; the graphic
image line on a black-and-white screen generated by CHR$(85) is an
eight-pixel line, with even-numbered points white and odd-numbered
points black. That is, each bit equal to 1 turns the associated pixel
on and each bit equal to 0 turns the associated bit off in a black-
and-white system. The ASCII character CHR$(85), which is U, is not
displayed in this case.
■ When supplied, background defines the "background tile slice" to skip
when checking for boundary termination. You cannot specify more than
two consecutive bytes that match the tile string in the background
tile slice. If you specify more than two consecutive bytes, BASIC
generates the error message "Illegal function call."