GRAPHICS COMMANDS
(in alphabetical order):

print #handle, "backcolor COLOR"
This command sets the color used when drawn figures are filled with a color.  The same colors are available as with the COLOR command below.

print #handle, "backcolor red(0-255)  green(0-255) blue(0-255)"
The second form of backcolor specifies a  pure RGB color.

print #handle, "box x y"
This command draws a box using the pen position as one corner, and x, y as the other corner.

print #handle, "boxfilled x y"
This command draws a box using the pen position as one corner, and x, y as the other corner.  The box is filled with the color specified using the other BACKCOLOR command.

print #handle, "circle r"
This command draws a circle with radius r at the current pen position.

print #handle, "circlefilled r"
This command draws a circle with radius r, and filled with the color specified using the BACKCOLOR command.

print #handle, "cls"
This command clears the graphics window, erasing all drawn elements and flushed segments (and releasing all the memory they used).

print #handle, "color COLOR"
This command sets the pen's color to be COLOR

print #handle, "color red(0-255)  green(0-255) blue(0-255)"

The second form of color specifies a  pure RGB color.

print #handle, "delsegment n"
This causes the drawn segment with segment ID number "n" to be removed from the window's list of drawn items.

print #handle, "delsegment segmentName"
This causes the drawn segment that has been assigned "segmentName" to be removed from the window's list of drawn items.

print #handle, "discard"
This causes all drawn items since the last flush to be discarded (this also reclaims memory used by the discarded drawn items).  Discard does not force an immediate redraw, so the items that have been discarded will still be displayed until a redraw.

print #handle, "down"
This command is the opposite of UP.  This command reactivates the drawing process.  The pen must be DOWN to cause graphics to be displayed.


print #handle, "drawbmp bmpname x y"
This command draws a bitmap named bmpname (loaded beforehand with the LOADBMP statement) at the location x y.


print #handle, "ellipse w h"
This command draws an ellipse centered at the pen position of width w and height h.

print #handle, "ellipsefilled  w h"
This command draws an ellipse centered at the pen position of width w and height h.  The ellipse is filled with the color specified using the command backcolor.


print #handle, "fill COLOR"
This command fills the window with COLOR.

print #handle, "fill red(0-255)  green(0-255) blue(0-255)"
This command fills the window with COLOR.

print #handle, "flush"
This command ensures that drawn graphics 'stick'.  Each time a flush command is issued after one or more drawing operations, a new group (called a segment) is created.  Each segment of drawn items has an ID number.  The segment command retrieves the ID number of the current segment.  Each time a segment is flushed, a new empty segment is created, and the ID number increases by one.  See also the commands cls, delsegment, discard, redraw, and segment.

print #handle, "flush segmentName"
This command ensures that drawn graphics 'stick', and assigns a name to the flushed segment.

print #handle, "font facename pointSize"
This command sets the pen's font to the specified face and point size. 

print #handle, "getbmp bmpName x y width height"
This command will make a bitmap copied from the graphics window at x, y and using width and height.

print #handle, "go D"
This causes the drawing pen to move forward D distance from the current position, moving in the current direction.

print #handle, "goto X Y"
This command moves the pen to position X Y.  A line will be drawn if the pen is down.

print #handle, "home"
This command centers the pen in the graphics window.

print #handle "horizscrollbar on/off [min max]"
This command manages the horizontal scrollbar. If the value is "on", the scrollbar is made visible.  If the value is "off", the scrollbar is hidden. When turning on the scrollbar the optional parameters for min and max set the minimum and maximum scrollbar range in pixels.

print #handle, "line X1 Y1 X2 Y2"
This command draws a line from point X1 Y1 to point X2 Y2.  If the pen is up, then no line will be drawn, but the pen will be positioned at X2 Y2.

print #handle, "locate x y width height"
This command is for a graphicbox, not a graphics window, and it repositions the control in its window.  This is effective when the control is placed inside a window of type "window".  The control will not update its size and location until a refresh command is sent to the window.

print #handle, "north"
This command sets the current direction to 270 (north).  Zero degrees points to the right (east), 90 points down (south), and 180 points left (west).

print #handle, "pie w h angle1 angle2"
This command draws a pie slice inside an ellipse of width w and height h.  The pie slice will begin at angle1, and sweep clockwise angle2 degrees if angle2 is positive, or sweep counter-clockwise angle2 degrees if angle2 is negative.

print #handle, "piefilled w h angle1 angle2"
This command draws a pie slice. The pie slice is filled with the color specified using the BACKCOLOR command.

print #handle, "place X Y"
This command positions the pen at X Y.  No graphics will be drawn, even if the pen is DOWN.

print #handle, "posxy xVar yVar"
This command assigns the pen's current position to xVar & yVar.

print #handle, "print [size]"
This command sends the plotted image to the Windows Print Manager for output. The size argument is optional.

print #handle, "print"
Just BASIC scales graphics automatically when sending them to a printer, unless the optional size argument is used.  Use the DUMP command to cause printing to begin immediately.

print #handle, "redraw"
or
print #handle, "redraw "; idNum
or 
print #handle, "redraw "; segmentName
This command causes the window to redraw all flushed drawn segments, or a specific drawn segment.

print #handle, "rule rulename"
or
print #handle, "rule "; _R2_NOTXORPEN
This command specifies whether drawing overwrites (rulename OVER) graphics already on the screen or uses the exclusive-OR technique (rulename XOR).

print #handle, "segment variableName"
This causes the window to set variableName to the segment ID of the currently open drawing segment.  To get the segment ID of the last segment flushed, subtract one.  

print #handle, "set x y"
This command draws a point at x, y using the current pen color and size.

print #handle, "setfocus"
This causes Windows to give input focus to this control.

print #handle, "size S"
This command sets the size of the pen to S.  The default is 1.

print #handle, "\text"
or
print #handle, "|text"
This command displays the specified text at the current pen position.

print #handle, "trapclose branchLabel"
This will tell Just BASIC to continue execution of the program at branchLabel if the user double clicks on the system menu box or pulls down the system menu and selects close (this command does not work with graphicbox controls).

print #handle, "turn A"
This command causes the drawing pen to turn from the current direction, using angle A and adding it to the current direction.  A can be positive or negative.

print #handle, "up"
This command lifts up the pen.

print #handle "vertscrollbar on/off [min max]"
This command manages the vertical scrollbar.

print #handle, "when event eventHandler"
This tells the window to process mouse and keyboard events.

print #handle, "when leftButtonDown"
If the expression print #handle, "when event" is used with no branch label designation, then trapping for that event is discontinued.





