draw-text in dc<%>
Draws a text string at a specified point, using the current text font, and the current text foreground and background colors. For unrotated text, the specified point is used as the starting top-left point for drawing characters (e.g, if ``W'' is drawn, the point is roughly the location of the top-left pixel in the ``W''). Rotated text is rotated around this point.
See
get-text-extent for information on the size of the drawn text.
See also
set-text-foreground,
set-text-background, and
set-text-mode.
The current brush and current pen settings for the DC have no effect on how the text is drawn.
(-> voidsenda-dcdraw-texttextxycombine?offsetangle)
text: string
x: real number
y: real number
combine?=#f: boolean
offset=0: exact non-negative integer
angle=0: real numberRestrictions on the magnitude of drawing coordinates are described with
dc<%>.The
textstring is drawn starting from theoffsetcharacter, and continuing until the end oftextor the first null character.If
combine?is#t, thentextmay be measured with adjacent characters combined to ligature glyphs, with Unicode combining characters as a single glyph, with kerning, with right-to-left rendering of characters, etc. Ifcombine?is#f, then the result is the same as if each character is measured separately, and Unicode control characters are ignored.The string is rotated by
angleradians counter-clockwise. Ifangleis not zero, then the text is always drawn in transparent mode (seeset-text-mode).