bool get_text_extent_point(handle device,
                           const character* text,
                           int length,
                           int maximum,
                           int* fit,
                           int* dx,
                           dimensions* extent)

This function obtains the extents of characters of a string.


handle device

The handle of the device context.

const character* text

A pointer to the text whose character extents are being queried.

int length

The length of the text pointed to by the previous parameter.

int maximum

The maximum width (in logical units) to which the string may extend.

int* fit

A pointer to an integer that is updated to contain the number of characters that fit the maximum extent specified by the previous parameter. If this parameter is null, the previous parameter is ignored.

int* dx

A pointer to an array of integers that receives the partial string extents. Each element in the array holds the distance (in logical units) from the beginning of the string to one of the characters. Information is returned only for characters that fit the extent specified by the parameter maximum; however, to be safe, the array should have at least as many elements as characters in the string. If this parameter is null, character extents are not calculated.

dimensions* extent

A pointer to an object that is updated to hold the dimensions of the string - in logical units.



true The function succeeded.
false The call failed.


If both of the parameters fit and dx are null, a call to this function is equivalent to calling the function get_text_extent.