Original Author Paul Laughton, 2011
Page 157
De Re BASIC!
When you increase the stroke weight, the lines get wider, but the centers of the lines do not change.
Additional lines of pixels are colored on both sides of the outline. Increasing the stroke weight generally
increases the area of the shape, making it larger than the dimensions you specify.
This may not be what you expect. In some drawing systems, increasing the line width grows the line
inward only, toward the center of the shape, so the shape does not get any bigger.
FILL
If you specify FILL (style 1), the center of the shape is filled as if it had an outline. That is, the center of
the object is colored, but the pixels colored by STROKE may be left uncolored. The area that is colored
depends on the coordinates of the shape. For example, consider 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: One more than the right-most edge. All pixels with x-coord right - 1 are colored.
bottom: One more than the lower-most edge. Pixels with y-coord bottom - 1 are colored.
left and top values are "inclusive": pixels with x-coodinate left are colored. Pixels with y-coordinate top
are colored.
right and bottom values are "exclusive": pixels with x-coodinate right are not colored. Pixels with y-
coordinate bottom are not colored.
This is not what most people expect, but it is consistent with many operations in Java programming.
STROKE and FILL
If you specify STROKE_AND_FILL (style 2), both parts of the shape are drawn and superimposed. That is,
the outline is drawn as described in STROKE, above, and the object is filled in as described in FILL.
Because both parts are the same color, and there are never uncolored pixels beween the STROKE lines
and the FILL area, the effect is to draw a single solid shape. Note that increasing the stroke weight
generally makes the shape bigger than the dimensions you specify.
Hardware-accelerated Graphics
Many Android devices since 3.0 (Honeycomb) support hardware acceleration of some graphical
operations. An app that can use the hardware Graphics Processor (GPU) may run significantly faster
than one that cannot use the GPU. Some of BASIC!'s graphical operations do not work with hardware-
acceleration, so it is disabled by default. You can turn it on with the Graphic Acceleration item of the
Editor->Menu->Preferences screen.
If you enable accelerated graphics, test your app thoroughly, comparing it to what you see with
acceleration off. If you see blurring, missing objects, or other problems, leave acceleration disabled.