All Manuals > CAPI User Guide and Reference Manual > 22 GRAPHICS-PORTS Reference Entries

NextPrevUpTopContentsIndex

draw-string

Function
Summary

Draws a string with the baseline positioned at a given point.

Package

graphics-ports

Signature

draw-string port string x y &rest args &key start end block

Arguments

port

A graphics port.

string

A string.

x

A real number.

y

A real number.

start

A real number.

end

A real number.

block

A boolean.

args

graphics-state parameters passed as keyword arguments.

Description

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 the 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.

Notes

The graphics-state parameter operation is not supported for drawing text on Microsoft Windows.

Example
(let ((op (capi:contain 
           (make-instance 'capi:output-pane
                          :background :red))))
  (gp:draw-string op "highlighted"
                  10 10
                  :graphics-args 
                  (list :foreground 
                        :color_highlighttext)))
See also

graphics-state
Drawing - Graphics Ports


CAPI User Guide and Reference Manual (Macintosh version) - 3 Aug 2017

NextPrevUpTopContentsIndex