DrawStrWidth Function (ROM Call 0x197)

graph.h

short DrawStrWidth (const char *str, short Font);

Determines the width of a string, in pixels.

DrawStrWidth returns the actual width of the string str according to the font number given by parameter Font. For 8x10 and 6x8 fonts, this is just 8 or 6 times the length of the string, but the 4x6 font is proportional. See FontSetSys for more info on fonts.


Uses: strlen, sf_width
Used by: cmd_dialog, cmd_text, Dialog, MenuBegin, MenuKey, MenuOff, MenuOn, MenuTopRedef, MenuTopSelect, DrawWinBorder, ROM Call 0x421, ROM Call 0x4D7


See also: DrawStrWidthP