This function calculates the dimensions of the specified text string, if the string were to be drawn with the graphics context gc.
Type | Name | Description |
---|---|---|
GR_GC_ID | gc | The ID of the graphics context to use when calculating the string dimensions. |
void* | str | The input string. If the string is NOT zero terminated, then the length of the string must be specified in the count parameter. |
int | count | The length of the string. This parameter can be set to -1 if the string is zero terminated andflags contains GR_TFASCII. |
int | flags | Text rendering flags, can be a combination of the flags listed below. |
GR_SIZE* | retwidth | Points to the variable that the text width will be returned in. |
GR_SIZE* | retheight | Points to the variable that the text height will be returned in. |
GR_SIZE* | retbase | Points to the variable that the text baseline height will be returned in. |
The flags parameter is a combination of flags from the following three groups. The combination can include one encoding flag, one alignment flag and multiple attribute flags.
String encoding flags:
Text alignment flags:
Text attribute flags: