Page 109 Table of Contents Index Page 111
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



CHAPTER 12. GRAPHICS

Draws a line on the medium medium. The line is drawn from (x1;y1) to (x2;y2), with the start
and end positions transformed by the medium's current transformation. medium-draw-line*
will call port-draw-line* in order to draw the line.

=> medium-draw-lines* medium coord-seq [Generic Function]
Draws a set of disconnected lines on the medium medium. coord-seq is a sequence of coordinate
pairs, which are real numbers. It is an error if coord-seq does not contain an even number of
elements. The coordinates in coord-seq are transformed by the medium's current transformation.
medium-draw-lines* will call port-draw-lines* in order to draw the line.

=> medium-draw-polygon* medium coord-seq closed [Generic Function]
Draws a polygon or polyline on the medium medium. coord-seq is a sequence of coordinate pairs,
which are real numbers. It is an error if coord-seq does not contain an even number of elements.
The coordinates in coord-seq are transformed by the medium's current transformation. medium-
draw-polygon*
will call port-draw-polygon* in order to draw the polygon.

=> medium-draw-rectangle* medium x1 y1 x2 y2 [Generic Function]
Draws a rectangle on the medium medium. The corners of the rectangle are at (x1;y1) and
(x2;y2), with the corner positions transformed by the medium's current transformation. medium-
draw-rectangle*
will call port-draw-rectangle* in order to draw the rectangle.

=> medium-draw-ellipse* medium center-x center-y radius-1-dx radius-1-dy radius-2-dx radius-2-
dy start-angle end-angle
[Generic Function]
Draws an rectangle on the medium medium. The center of the rectangle is at (x;y), and the
radii are specified by the two vectors (radius-1-dx,radius-1-dy) and (radius-2-dx,radius-2-dy).
The center point and radii are transformed by the medium's current transformation. medium-
draw-ellipse*
will call port-draw-ellipse* in order to draw the ellipse.

start-angle and end-angle are real numbers that specify an arc rather than a complete ellipse.
The medium transformation must be applied to the angles as well.

=> medium-draw-text* medium text x y (start 0) end (align-x :left) (align-y :baseline) toward-
x toward-y transform-glyphs
[Generic Function]
Draws a character or a string on the medium medium. The text is drawn starting at (x;y), and
towards (toward-x,toward-y); these positions are transformed by the medium's current transfor-
mation. medium-draw-text* will call either port-draw-string* or port-draw-character* in
order to draw the text.


Page 109 Table of Contents Index Page 111
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E