17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GW-BASIC <strong>User's</strong> Guide<br />

PAINT Statement<br />

Purpose:<br />

To fill in a graphics figure with the selected attribute.<br />

Syntax:<br />

PAINT (x start,y start)[,paint attribute[,border attribute][,bckgrnd<br />

attribute]]<br />

Comments:<br />

The PAINT statement fills in an arbitrary graphics figure of the specified border attribute with the<br />

specified paint attribute. If paint attribute is not given, it will default to the foreground<br />

attribute (3 or 1). border attribute defaults to paint attribute. See the COLOR and<br />

PALETTE statements for more information.<br />

PAINT must start on a non-border point, otherwise, PAINT will have no effect.<br />

PAINT can fill any figure, but painting jagged edges or very complex figures may result in an<br />

"Out of memory" error. The CLEAR statement may be used to increase the amount of stack<br />

space available.<br />

Points that are specified outside the limits of the screen will not be plotted and no error will occur.<br />

See the SCREEN statement for a description of the different screen modes.<br />

Paint Tiling<br />

PAINT tiling is similar to LINE styling. Like LINE, PAINT looks at a tiling mask each time a<br />

point is put down on the screen.<br />

If paint attribute is omitted, the standard foreground attribute is used.<br />

If paint attribute is a numeric formula, then the number must be a valid color, and it is used<br />

to paint the area as before.<br />

If paint attribute is a string formula, then tiling is performed as follows:<br />

The tile mask is always eight bits wide and may be from 1 to 64 bytes long.<br />

Each byte in the tile string masks eight bits along the x axis when putting down points. Each byte<br />

of the tile string is rotated as required to align along the y axis, such that:<br />

tile_byte_mask=y MOD tile_length<br />

where y is the position of the graphics cursor on the y-axis.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/PAINT.html (1 of 3)28/03/2004 21.29.17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!