Next: Characteristics of Graphics Output, Previous: Coordinates for Graphics, Up: Graphics [Contents][Index]
The procedures in this section provide the basic drawing capabilities of Scheme’s graphics system.
Clears the display of graphics-device. Unaffected by the current drawing mode.
Draws a single point on graphics-device at the virtual coordinates given by x and y, using the current drawing mode.
Erases a single point on graphics-device at the virtual coordinates given by x and y. This procedure is unaffected by the current drawing mode.
This is equivalent to
(lambda (device x y) (graphics-bind-drawing-mode device 0 (lambda () (graphics-draw-point device x y))))
X-start, y-start, x-end, and y-end must be real numbers. Draws a line on graphics-device that connects the points (x-start, y-start) and (x-end, y-end). The line is drawn using the current drawing mode and line style.
Draws the characters of string at the point (x, y) on graphics-device, using the current drawing mode. The characteristics of the characters drawn are device-dependent, but all devices are initialized so that the characters are drawn upright, from left to right, with the leftmost edge of the leftmost character at x, and the baseline of the characters at y.
The following two procedures provide an alternate mechanism for drawing lines, which is more akin to using a plotter. They maintain a cursor, which can be positioned to a particular point and then dragged to another point, producing a line. Sequences of connected line segments can be drawn by dragging the cursor from point to point.
Many graphics operations have an unspecified effect on the cursor. The following exceptions are guaranteed to leave the cursor unaffected:
graphics-device-coordinate-limits graphics-coordinate-limits graphics-enable-buffering graphics-disable-buffering graphics-flush graphics-bind-drawing-mode graphics-set-drawing-mode graphics-bind-line-style graphics-set-line-style
The initial state of the cursor is unspecified.
Moves the cursor for graphics-device to the point (x, y). The contents of the device’s display are unchanged.
Draws a line from graphics-device’s cursor to the point (x, y), simultaneously moving the cursor to that point. The line is drawn using the current drawing mode and line style.
Next: Characteristics of Graphics Output, Previous: Coordinates for Graphics, Up: Graphics [Contents][Index]