NNS_G2dFontGetTextRect

C Specification

#include <nnsys/g2d/g2d_Font.h>

NNSG2dTextRect NNS_G2dFontGetTextRect(
	const NNSG2dFont* pFont,
	int hSpace,
	int vSpace,
	const NNSG2dChar* txt
);

Arguments

pFont [IN] Pointer to font
hSpace [IN] Character interval (in pixels)
vSpace [IN] Line interval (in pixels)
txt [IN] Pointer to character string

Return Values

Returns the width and height that the character string has when drawn ( in pixels).

Description

Calculates the height and width that character string txt has when drawn.

For information on the other arguments, see NNS_G2dTextCanvasInit.

Use this function when you want to know the size of the character string before creating the TextCanvas. For example, use it when you are dynamically creating the smallest CharCanvas that can display all of txt. When TextCanvas is already created, use NNS_G2dTextCanvasGetTextRect.

See Also

Revision History

05/25/2005 Initial version.


CONFIDENTIAL