Page 111 Table of Contents Index Page 113
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 rectangle on the medium medium on the port port. When line-style is nil, this draws a
filled rectangle; otherwise, line-style is the line style to use when drawing an unfilled rectangle.
The device transformation is applied to (x1;y1) and (x2;y2) to produce the corners of the
rectangle.

=> port-draw-ellipse* port medium center-x center-y radius-1-dx radius-1-dy radius-2-dx radius-
2-dy start-angle end-angle
&optional ink line-style clipping-region [Generic Function]
Draws an ellipse rectangle on the medium medium on the port port. When line-style is nil, this
draws a filled ellipse; otherwise, line-style is the line style to use when drawing an unfilled ellipse.

The center of the ellipse is produced by applying the device transformation to (center-x,center-
y
). Two vectors, (radius-1-dx,radius-1-dy) and (radius-2-dx,radius-2-dy) specify the bounding
parallelogram of the ellipse as explained in Chapter 3. When the ellipse vectors have the same
length, the ellipse is circle. The device transformation must is applied to the vectors as well.

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

=> port-draw-string* port medium text x y (start 0) end (align-x :left) (align-y :baseline)
toward-x toward-y transform-glyphs
&optional ink text-style clipping-region [Generic Function]
Draws a string on the medium medium on the port port. The string is drawn starting at the
position that results from applying the device transformation to (x;y), and towards (toward-
x
,toward-y). align-x is one of :left, :center, or :right. align-y is one of :baseline, :top,
:center, or :bottom.

start and end specify the start and end of the string. start is an integer that is less than the
length of the string. end is an integer that is less than the length of the string, but greater than
or equal to start.

Normally, glyphs are drawn from left to right, but toward-x and toward-y can be used to change
the direction from one glyph to the next one. The reference point in each glyph lies on a line from
(x;y) to (toward-x,toward-y) and the spacing of each glyph is determined by packing rectangles
along that line, where each rectangle is "char-width" wide and "char-height" high. Of course,
some ports may not be able to fully support this.

If transform-glyphs is true, then each glyph is transformed as an image before it is drawn. It
is permissible for CLIM implementations to ignore transform-glyphs if it is too expensive to
implement.

=> port-draw-character* port medium character x y (align-x :left) (align-y :baseline) &optional
ink text-style clipping-region [Generic Function]
Draws a single character on the medium medium on the port port at the position that results
from applying the device transformation to (x;y). align-x is one of :left, :center, or :right.
align-y is one of :baseline, :top, :center, or :bottom.


Page 111 Table of Contents Index Page 113
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