Page 104 Table of Contents Index Page 106
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

draw-ellipse and draw-ellipse*. filled is as for draw-ellipse*.

start-angle and end-angle allow the specification of an arc rather than a complete circle in the
same manner as that of the ellipse functions, above.

The "filled arc" behavior is the same as that of an ellipse, above.

=> draw-text sheet string-or-char point &key text-style (start 0) end (align-x :left) (align-y :baseline)
toward-point transform-glyphs ink clipping-region transformation text-style text-family text-face
text-size
[Function]

=> draw-text* sheet string-or-char x y &key text-style (start 0) end (align-x :left) (align-y :baseline)
toward-x toward-y transform-glyphs ink clipping-region transformation text-style text-family text-
face text-size
[Function]

The text specified by string-or-char is drawn on the sheet sheet starting at the position specified
by the point point (or the position (x;y)). The exact definition of "starting at" is dependent on
align-x and align-y. align-x is one of :left, :center, or :right. align-y is one of :baseline,
:top, :center, or :bottom. align-x defaults to :left and align-y defaults to :baseline; with
these defaults, the first glyph is drawn with its left edge and its baseline at point.

text-style defaults to nil, meaning that the text will be drawn using the current text style of the
sheet's medium.

start and end specify the start and end of the string, in the case where string-or-char is a string.
If start is supplied, it must be an integer that is less than the length of the string. If end is
supplied, it must be 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 no matter what transformation is in effect. toward-
x
or toward-y (derived from toward-point in the case of draw-text) can be used to change the
direction from one glyph to the next one. For example, if toward-x is less than the x position of
point, then the glyphs will be drawn from right to left. If toward-y is greater than the y position
of point, then the glyphs' baselines will be positioned one above another. More precisely, the
reference point in each glyph lies on a line from point to toward-point, 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.

If transform-glyphs is true, then each glyph is transformed as an image before it is drawn.
That is, if a rotation transformation is in effect, then each glyph will be rotated individually.
If transform-glyphs is not supplied, then the individual glyphs are not subject to the current
transformation. It is permissible for CLIM implementations to ignore transform-glyphs if it is
too expensive to implement.

12.5.2 Compound Drawing Functions

CLIM also provides a few compound drawing functions. The compound drawing functions could
be composed by a programmer from the basic drawing functions, but are provided by CLIM


Page 104 Table of Contents Index Page 106
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