PAINT

From QB64 Wiki

Revision as of 20:41, 26 April 2011 by Clippy (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The PAINT statement is used to color enclosed graphic objects with a designated fill color and border COLOR.


Syntax:

PAINT [STEP] (column%, row%), fillcolor%[, bordercolor%][,background$]


Description:

  • PAINT coordinates MUST be inside of a closed shape to be colored. Paint wii not do anything when placed on the border color.
  • If the border color does not enclose the area, PAINT may flood the screen or go beyond the border area.
  • Fillcolor is the color to paint the inside of an object. Colors limited to SCREEN mode used.
  • Border color is the color of the enclosed shape's border. The border color does not change.
  • If the shape is not totally enclosed, every color except the border color may be painted over.
  • The border color can be omitted if the fill color is the same as the border color.
  • The background string(usually an ASCII character) sets the tiling style. Default = CHR$(0). Rarely used.
  • Can use the STEP keyword for relative coordinate placements.


Example: Painting a CIRCLE.

SCREEN 12 x = 200: y = 200 CIRCLE (x, y), 100, 10 PAINT STEP(0, 0), 2, 10

Results: A circle located at x and y with a bright green border filled in dark green. The last coordinate used was the circle's center point and PAINT used it also with the STEP relative coordinates being zero.


See also:



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page