258 Programming
Sets the color of the pixel of G with coordinates x,y to
white. G can be any of the graphic variables and is
optional. The default is G0, the current graphic
GETPIX and
GETPIX_P Syntax: GETPIX([G], xposition, yposition)
GETPIX_P([G], xposition, yposition)
Returns the color of the pixel of G with coordinates x,y.
G can be any of the graphic variables and is optional.
The default is G0, the current graphic.
RECT and
RECT_P Syntax: RECT([G, x1, y1, x2, y2, edgecolor, fillcolor])
RECT_P([G, x1, y1, x2, y2, edgecolor, fillcolor])
Draws a rectangle on G between points x1,y1 and x2,y2
using edgecolor for the perimeter and fillcolor for the
inside.
G can be any of the graphic variables and is optional.
The default is G0, the current graphic
x1, y1 are optional. The default values represent the top
left of the graphic.
x2, y2 are optional. The default values represent the
bottom right of the graphic.
edgecolor and fillcolor can be -1 to 3 (-1= transparent,
0=black, 1= dark gray, 2= light gray, 3= white).
edgecolor is optional. The default is white.
fillcolor is optional. The default is edgecolor.
Note: To erase a GROB, execute RECT(G). To clear the
screen execute RECT().
When optional arguments are provided in a command
like RECT
, with multiple optional parameters, provided
arguments correspond to the leftmost parameters first. For
example, in the program below, the arguments 40 and
90 in the RECT_P command correspond to x1 and y1.
The argument 0 corresponds to edgecolor, since there is
only the one additional argument. If there had been two
additional arguments, they would have referred to x2
and y2 rather than edgecolor and fillcolor. The program
produces the figure below to the right.