Version: 4.1.3.3
4 Draw, Clear, and Flip Operations
The following are the basic graphics operations for drawing to a
viewport. Each function takes a viewport as its argument and returns
a function operating within that viewport. Further arguments, if any,
are curried. For example, (draw-line viewport) returns a
function, that can then be applied to the proper arguments to draw a
line in the viewport corresponding to viewport descriptor
viewport.
In general, draw- functions make pixels black or
colored, clear- functions make them white, and
flip- commands invert pixels (which makes
black white, white black, and is otherwise ill-defined).
4.1 Viewports
Colors the entire contents of viewport with color.
Whitens the entire contents of viewport.
Inverts the entire contents of viewport.
Copies the content of source into dest.
4.2 Pixels
Colors the pixel in viewport at p.
Whitens the pixel in viewport at p.
Inverts the pixel in viewport at p.
4.3 Lines
Draws a line in viewport connecting positions p1 and
p2.
Whitens a line in viewport connecting positions p1
and p2.
Inverts a line in viewport connecting positions
p1 and p2.
4.4 Rectangles
Draws a rectangle border in the viewport with the top-left of
the rectangle at the position p and with sides width
across and height tall.
Whitens a rectangle border in the viewport, analogous to
draw-rectangle.
Inverts a rectangle border in the viewport, analogous
to draw-rectangle.
Draws a solid rectangle in the viewport with the top-left of
the rectangle at the position p and with sides width
across and height tall.
Whitens a rectangle border in the viewport, analogous to
draw-solid-rectangle.
Inverts a rectangle border in the viewport, analogous
to draw-solid-rectangle.
4.5 Ellipses
Draws a ellipse border in the viewport. The ellipse is
inscribed with a rectangle whose top-left is at position p
and with sides width across and height tall.
Whitens a ellipse border in the viewport, analogous to
draw-ellipse.
Inverts a ellipse border in the viewport, analogous
to draw-ellipse.
Draws a solid ellipse in the viewport. The ellipse is
inscribed with a rectangle whose top-left is at position p
and with sides width across and height tall.
Whitens a ellipse border in the viewport, analogous to
draw-solid-ellipse.
Inverts a ellipse border in the viewport, analogous
to draw-solid-ellipse.
4.6 Polygons
Draws a polygon border in viewport using points for
the polygon vertices and offset as an offset added to all
points.
Whitens a polygon border in viewport, analogous to
draw-polygon.
Inverts a polygon border in viewport, analogous to
draw-polygon.
Draws a solid polygon in viewport using points for
the polygon vertices and offset as an offset added to all
points.
Whitens a polygon border in viewport, analogous to
draw-solid-polygon.
Inverts a polygon border in viewport, analogous to
draw-solid-polygon.
4.7 Strings
Draws a string at a specified location in the viewport.
The lower left of the string begins at p.
Whitens a string at a specified location in the viewport.
The lower left of the string begins at p.
Inverts a string at a specified location in the
viewport. The lower left of the string begins at
p.
4.8 Pixmaps