Docs » Autodocs » intuition.library » IntuiTextLength
IntuiTextLength -- Return the length (pixel-width) of an IntuiText.
Length = IntuiTextLength( IText ) D0 A0 LONG IntuiTextLength( struct IntuiText * );
This routine accepts a pointer to an instance of an IntuiText structure, and returns the length (the pixel-width) of the string which that instance of the structure represents. NOTE: if the Font pointer of your IntuiText structure is set to NULL, you'll get the pixel-width of your text in terms of the current system default font. You may wish to be sure that the field IText->ITextFont for 'default font' text is equal to the Font field of the screen it is being measured for.
IText = pointer to an instance of an IntuiText structure
Returns the pixel-width of the text specified by the IntuiText data
Would do better to take a RastPort as argument, so that a NULL in the Font pointer would lead automatically to the font for the intended target RastPort, rather than the system default font.
OpenScreen()
|