The PAINT statement fills in an arbitrary graphics figure of the specified border attribute with the specified paint attribute. If paint attribute is not given, it will default to the foreground attribute (3 or 1). border attribute defaults to paint attribute. See the COLOR and PALETTE statements for more information.
PAINT must start on a non-border point, otherwise, PAINT will have no effect.
PAINT can fill any figure, but painting jagged edges or very complex figures may result in an "Out of memory" error. The CLEAR statement may be used to increase the amount of stack space available.
Points that are specified outside the limits of the screen will not be plotted and no error will occur.
See the SCREEN statement for a description of the different screen modes.
PAINT tiling is similar to LINE styling. Like LINE, PAINT looks at a tiling mask each time a point is put down on the screen.
If paint attribute is omitted, the standard foreground attribute is used.
If paint attribute is a numeric formula, then the number must be a valid color, and it is used to paint the area as before.
If paint attribute is a string formula, then tiling is performed as follows:
The tile mask is always eight bits wide and may be from 1 to 64 bytes long.
Each byte in the tile string masks eight bits along the x axis when putting down points. Each byte of the tile string is rotated as required to align along the y axis, such that:
tile_byte_mask=y MOD tile_length
where y is the position of the graphics cursor on the y-axis.
tile_length is the length in bytes of the tile string defined by the user (1 to 64 bytes).
This is done so that the tile pattern is replicated uniformly over the entire screen (as if a PAINT (0,0).. were used).
Since there are two bits per pixel in medium-resolution mode (SCREEN 1), each byte of the tile pattern only describes four pixels. In this case, every two bits of the tile byte describes one of the four possible colors associated with each of the four pixels to be put down.
bckgrnd attribute specifies the background tile pattern or color byte to skip when checking for boundary termination. bckgrnd attribute is a string formula returning one character. When omitted, the default is CHR$(0).
Occasionally, you may want to paint tile over an already painted area that is the same color as two consecutive lines in the tile pattern. PAINT quits when it encounters two consecutive lines of the same color as the point being set (the point is surrounded). It is not possible to draw alternating blue and red lines on a red background without bckgrnd attribute. PAINT stops as soon as the first red pixel is drawn. By specifying red (CHR$(&HAA)) as the background attribute, the red line is drawn over the red background.
You cannot specify more than two consecutive bytes in the tile string that match the background attribute. Specifying more than two results in an "Illegal function call" error.
All Frank Sinatra recordings, All Beatles albums, All solo albums from John Lennon, Paul McCartney, George Harrison and Ringo Starr, All Beatles songs, List of Platinum selling albums, Database with hits from 1950 to 1999.
Sought after DLL files, Nutworks magazine (retro), Worldwide ISO and TLD codes, File extensions database, The Hackers dictionary, Free software for the Atari, Amiga and Macintosh, Nokia smartphone, PocketPC, List of all BASIC programming language commands, List of all DOS commands, Free Advanced Bash-Scripting Guide (Linux-Unix)