Retrieves width and height for formatted text.
char * GetTextExtent (TextCel *tCel, int32 *pWidth,int32 *pHeight, char *fmtString,...)
Calculates the on-screen extent that would be used by the formatted text. GetTextExtent formats text (if necessary), calculates the pixel width and height required to display the text, and returns width/height values via the pointers you provide. The function return value is a pointer to the formatted text (with printf-style formatting already resolved), a feature that is mainly a convenience for the text library internals.
This function does not take clipping into account; the returned width and height may be larger than the current size of the text cel specified. As a result, you can use this function to determine whether a cel needs to be expanded by comparing the width and height it returns with the ccb_Width and ccb_Height fields in the current cel.
The related vGetTextExtent()
function works exactly the same, but takes a va_list type instead of the … parameters.
Pointer to the formatted text.
lib3do.lib, textlib.h
vGetTextExtent