Draws a string with the baseline positioned at a given point.
graphics-ports
draw-string port string x y &rest args &key start end block
port⇩ |
A graphics port. |
string⇩ |
A string. |
x⇩ |
A real number. |
y⇩ |
A real number. |
args⇩ |
graphics-state parameters passed as keyword arguments. |
start⇩ |
A real number. |
end⇩ |
A real number. |
block⇩ |
A boolean. |
The function draw-string
draws the string string with the baseline starting at (x y). The transform, foreground, background, operation, stipple, pattern, mask, mask-transform, font, text-mode and compositing-mode from port's graphics-state are all used, unless overridden in args.
start and end specify which elements of string to draw. The default value of start is 0.
block, if true, causes each character to be drawn in a character cell filled with the background of port's graphics-state.
You can draw with the system highlight by setting graphics-state parameter foreground :color_highlighttext
and background :color_highlight
.
The graphics-state parameter operation is not supported for drawing text on Microsoft Windows.
(let ((op (capi:contain (make-instance 'capi:output-pane :background :red)))) (gp:draw-string op "highlighted" 10 10 :graphics-args (list :foreground :color_highlighttext)))
CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:44