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

get-string-extent Function

Summary

Returns the extent in pixels of a string.

Package

graphics-ports

Signature

get-string-extent port string &optional font => left, top, right, bottom

Arguments
port
A CAPI pane.
string
A string.
font
A font.
Values
left
An integer.
top
An integer.
right
An integer.
bottom
An integer.
Description

The function get-string-extent returns the extent in pixels of string in font.

font defaults to the font associated with port.

Note: To compute the horizontal extents of each successive character in a string for a given port or font, use compute-char-extents.

See also

compute-char-extents


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:44