IGR_Canvas_MeasureText¶
Returns the width and height in pixels, of a string if rendered with the current font.
Prototype¶
IGR_LONG IGR_Canvas_MeasureText(
HCANVAS canvas,
const IGR_UCS2* text,
IGR_LONG* width,
IGR_LONG* height,
Error_Control_Block* error);
Parameters¶
Canvas: HCANVAS
Handle to a canvas, opened by a call to IGR_Make_Output_Canvas.
Text: Pointer to Unicode String
Pointer to a NULL terminated Unicode string to be measured.
Width: Pointer to an IGR_LONG
Pointer to an integer that is populated with the calculated width.
Height: Pointer to an IGR_LONG
Pointer to an integer that is populated with the calculated height.
Error: Pointer to Error_Control_Block
Returns error details if the call fails.
Return value¶
Success: IGR_LONG
Returns IGR_OK.
Failure: IGR_LONG
Returns one of the possible IGR_E error codes.
Additional information¶
Note The drawing API is available for bitmap and PDF outputs only. Drawing onto an HTML5 output is not supported.