Reports the state of a mouse button.
BUTTON? (BUTTON? button)
BUTTON? reports the state of a mouse button. BUTTON? reports TRUE when the left button is depressed or FALSE when the button is not depressed. Is used with an additional input, the input is 1 for the left button, 2 for the middle button, and 3 for the right button.
Erases the graphics pane.
Erases the graphics pane and homes the turtle.
CLEARSCREEN erases the current Graphics window, deletes all control widgets, returns the turtle to the center of the window, and sets the turtle's heading to 0. CLEARSCREEN does not affect the pen state or window colors. See also
Clears the current graphics window and resets all attached turtles.
DRAW prepares the current Graphics window for drawing by doing the following:
Reports the extent of the current Graphics window.
EXTENT reports a list containing the X and Y extents of the current Graphics window, based on the extent settings of the first active turtle. In the default state, where one turtle step corresponds to one screen pixel, the extents are both zero.
For a detailed explanation of the window extent, see
Fences all turtles inside the drawing borders.
FENCE prevents the turtle from moving beyond the edge of the Graphics drawing borders. If you try to move the turtle outside the borders, it moves to the drawing border and stops.
Sets the size of the graphics grid.
GRID sets the horizontal and vertical scales of the Graphics window grid to its input.
Hides the grid of the Graphics window.
Displays the grid of the Graphics window.
GRIDON (GRIDON [horizontal vertical])
GRIDON makes a grid visible in the Graphics window. By default, the scale of the grid is 100 pixels on each axis.
The scale of the grid may be changed by supplying GRIDON with a list containing the desired horizontal and vertical scales for the grid and putting GRIDON and its argument in parentheses.
Loads a picture as background picture.
LOADPIC filename.ext (LOADPIC filename.ext TRUE)
LOADPIC loads the file from the cloud to the current graphics canvas. The file is loaded as a bit map that fills the current viewport. If no extension is given to the filename, the picture format that is loaded is the format specified in the built-in variable
:PICTURE.FORMAT. If the file has a different extension, then the extension must be specified in the LOADPIC command.
If the last input to LOADPIC is TRUE, LOADPIC loads multiple copies of the image instead and fills the entire graphics screen with these copies (it tiles the images).
Reports the position of the mouse cursor.
MOUSE reports the coordinates of the position of the mouse pointer as a list of two
numbers representing the x coordinate and the y coordinate. The coordinates are
relative to the center of the Graphics window. See also
Reports the shape of the mouse cursor.
MOUSESHAPE reports the number of the current mouse pointer shape as defined with the
SETMOUSESHAPE command. On startup, the mouse shape is 1.
Saves the contents of the Graphics window.
SAVEPIC filename.ext SAVEPIC type-decriptors (SAVEPIC) (SAVEPIC filename.ext "windowname)
SAVEPIC saves the contents of the current Graphics window into a bitmap file on disk.
SAVEPIC uses the boundaries of the current drawing area. If no extension is given to the filename, the picture format that is saved is the format specified in the built-in variable
:PICTURE.FORMAT. If you want a different format than the default, then the extension must be specified in the SAVEPIC command. SAVEPIC can save into several different formats; see
:PICTURE.FORMAT for a list of supported formats.
SAVEPIC displays a File Open dialog if it is called without any inputs, or if the input is a list of file type descriptors. For a description of file type descriptors, see the
OPEN command. Clicking the Cancel button in a File Save dialog causes the SAVEPIC command to return.
Set the extent of the current Graphics window.
SETEXTENT extent SETEXTENT [xExtent yExtent] (SETEXTENT)
SETEXTENT defines the coordinate mapping mode in terms of turtle steps. The default is an extent value of zero, which means the coordinate system has an aspect ratio of 1:1 regardless of the window size. Painting outside the window in
WINDOW mode is possible and the drawings become visible when the window is made larger.
If a different extent is defined, the coordinate system is mapped to the size given regardless of the window size. If an extent value of 200 is set, the coordinates range from -200 to +200. Scaling is performed automatically to fit within the window. It is possible to set different extents for the X and Y coordinates by using a two-element list as input. (SETEXTENT) resets the extent to 1:1 mapping.
Note that each individual turtle, control, or bitmap may have its own screen extent. Thus the lines drawn by different turtles for the same number of turtle steps may be of different lengths if their extents are not the same.
ASK 0 [SETEXTENT 100 PENUP SETX -25 PENDOWN] ASK 1 [SETEXTENT 50 PENUP SETX 25 PENDOWN] TELL [0 1] ST FORWARD 30
Sets the shape of the mouse cursor.
SETMOUSESHAPE number (SETMOUSESHAPE)
SETMOUSESHAPE changes the shape of the mouse cursor when it is within the Graphics window. Its input is a number representing one of 23 available mouse shapes. When Logo starts, the mouse shape is 1. If SETMOUSESHAPE is enclosed in parentheses without inputs, shape 1 is used.
MOUSESHAPE reports the number of the current mouse shape.
Removes the boundary for turtle movements.
WINDOW removes the boundaries from the turtle's field of movement. If the turtle moves beyond the borders of the Graphics drawing borders, it continues to move, but cannot be seen. The Graphics window becomes a small window overlooking the plane on which the turtle can travel.
Lets the turtles wrap inside the window.
WRAP maintains the turtle inside the Graphics drawing borders no matter how large a movement command is given. Any time the turtle moves off the window border, it wraps around the window and reappears on the opposite edge. When Logo starts up, the default window state is WRAP.
HOME SETH 20 WRAP FD 1500