Original Author Paul Laughton, 2011
Page 156
De Re BASIC!
Each command that changes a drawing setting (Gr.color, Gr.text.size, etc.) creates or modifies a Paint.
Each of these commands has an optional "Paint pointer" parameter. If you don't specify which Paint to
use, the command first copies the Current Paint and then modifies it to make a new Paint, which then
becomes the Current Paint. If you do specify which Paint to use, the command modifies only the
specified Paint, leaving the Current Paint unchanged.
The Current Paint is always the last Paint on the Paint List.If you specify the Paint object, the pointer
values -1 and 0 are special.
Paint pointer value -1 means the Current Paint. Using -1 is the same as omitting the Paint pointer
parameter.
Paint pointer value 0 refers to a "working Paint". You can change it as often as you like without
generating a new Paint. Paint 0 can not be attached to a graphical object. To make it useful, you must
copy it (Gr.paint.copy) to another location in the Paint List, or to the Current Paint.
You can get a pointer to the current Paint with the Gr.paint.get command. You can get a pointer to the
Paint associated with any graphical object by using the "paint" tag with Gr.get.value command. You can
assign that Paint to any other graphical object by using the "paint" tag with Gr.modify command.
Paints can not be individually deleted. You may delete all Paint objects, along with all graphics objects,
with Gr.cls.
The commands Gr.paint.copy and Gr.paint.reset operate directly on Paint objects.
Style
Most graphics objects are made up of two parts: an outline and the center. There is a subtle but
important difference in the rules governing how each part is drawn. The two parts are controlled by the
style setting of the Paint object, set by the style parameter of the Gr.color command.
Note: Gr.Point and Gr.Line are not affected by style. Only the STROKE part (outline) is drawn.
STROKE
If you specify STROKE (style 0), only the outline is drawn. The center of the shape is not colored. The
width of the outline is controlled by the stroke weight setting of the Paint, set by the Gr.stroke
command. If the stroke weight is 0 or 1 (they behave the same way), the outline is drawn exactly on the
coordinates you provide. For example, if the shape is a rectangle:
left: The left-most edge. All pixels with x-coordinate left are colored.
top: The upper-most edge. All pixels with y-coordinate top are colored.
right: The right-most edge. All pixels with x-coord right are colored.
bottom: The lower-most edge. All pixels with y-coord bottom are colored.
This is probably what you expect.