# NNS_G2dTextCanvasGetTextRect

## C Specification

      #include <nnsys/g2d/g2d_TextCanvas.h>

      NNSG2dTextRect NNS_G2dTextCanvasGetTextRect(
      	const NNSG2dTextCanvas* pTxn,
      	const NNSG2dChar* txt
      );

## Arguments

pTxn | [IN] Pointer to TextCanvas
txt | [IN] Pointer to text string

## Return Values

Returns the width and height that the text string has when drawn

The `NNSG2dTextRect` struct definition follows:

    typedef struct NNSG2dTextRect
    {
    	int width;	// Rectangle width
    	int height;	// Rectangle height
    }
    NNSG2dTextRect;

## Description

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

## See Also

`NNS_G2dFontGetTextRect, NNS_G2dTextCanvasGetStringWidth, NNS_G2dTextCanvasGetTextWidth, NNS_G2dTextCanvasGetTextHeight`

## Revision History

05/25/2005 Initial version.