#include <nnsys/g2d/g2d_TextCanvas.h>
NNSG2dTextRect NNS_G2dTextCanvasGetTextRect(
const NNSG2dTextCanvas* pTxn,
const NNSG2dChar* txt
);
| pTxn | [IN] Pointer to TextCanvas |
| txt | [IN] Pointer to text string |
Returns the width and the height of a drawn text string.
The NNSG2dTextRect struct definition follows:
typedef struct NNSG2dTextRect
{
int width; // Rectangle width
int height; // Rectangle height
}
NNSG2dTextRect;
Calculates the height and width that text string txt has when drawn.
For the vertically written fonts, width and height are calculated in reverse.
NNS_G2dFontGetTextRect, NNS_G2dTextCanvasGetStringWidth, NNS_G2dTextCanvasGetTextWidth, NNS_G2dTextCanvasGetTextHeight
2007/03/14 Added support for vertically written/held fonts.
2005/05/25 Initial version.
CONFIDENTIAL