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

NextPrevUpTopContentsIndex

compute-char-extents

Function
Summary

Returns the x coordinates of the end of each of the characters in a string if the string was printed to a graphics port.

Package

graphics-ports

Signature

compute-char-extents port string &optional font => extents

Arguments

port

A CAPI pane.

string

A string.

font

A font.

Values

extents

An array of integers.

Description

Returns the extents of the characters in string in the font associated with port , or the font given. The extents are an array, one element per character, which gives the ending x coordinate of that character if the string was drawn to port .

Note: To compute the extents of the entire string for a given port or font, use port-string-width or get-string-extent.

See also

get-string-extent
port-string-width


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

NextPrevUpTopContentsIndex