Original Author Paul Laughton, 2011
Page 164
De Re BASIC!
Gr.circle <obj_nvar>, x, y, radius
Creates a circle object. The circle will be created with the given radius around the designated center (x,y)
coordinates. The circle will or will not be filled depending upon the Gr.color style parameter. The
<obj_nvar> returns the Object List object number for this circle. This object will not be visible until the
Gr.render command is called.
The Gr.modify parameters for Gr.circle are "x", "y", and "radius".
Gr.set.pixels <obj_nvar>, pixels[{<start>,<length>}] {,x,y}
Inserts an array of pixel points into the Object List. The array (pixels[]) or array segment
(pixels[start,length]) contains pairs of x and y coordinates for each pixel. The pixels[] array or array
segment may be any size but must have an even number of elements.
If the optional x,y expression pair is present, the values will be added to each of the x and y coordinates
of the array. This provides the ability to move the pixel array around the screen. The default values for
the x,y pair is 0,0. Negative values for the x,y pair are valid.
Pixels will be drawn as 2x2 matrix pixels if AntiAlias is on and the stroke = 0. To draw single-pixel pixels,
set AntiAlias off and set the stroke = 0. AntiAlias in on by default.
The <obj_nvar> returns the Object List object number for the object. The pixels will not be visible until
the Gr.render command is called.
The Gr.modify parameters for this command are "x" and "y".
In addition to modify, the individual elements of the pixel array can be changed on the fly. For example:
Pixels[3] = 120
Pixels[4] = 200
will cause the second pixel to be located at x = 120, y = 200 at the next rendering.
Gr.poly <obj_nvar>, list_pointer {,x, y}
Creates an object that draws a closed polygon of any number of sides. The <obj_nvar> returns the
Object List object number for this polygon. This object will not be visible until the next Gr.render.
The list_pointer is an expression that points to a List data structure. The list contains x,y coordinate
pairs. The first coordinate pair defines the point at which the polygon drawing starts. Each subsequent
coordinate pair defines a line drawn from the previous coordinate pair to this coordinate pair. A final
line drawn from the last point back to the first closes the polygon.
If the optional x,y expression pair is present, the values will be added to each of the x and y coordinates
of the list. This provides the ability to move the polygon array around the screen. The default x,y pair is
0,0. Negative values for x and y are valid.