#include <nnsys/g2d/g2d_TextCanvas.h>
void NNS_G2dTextCanvasDrawText(
const NNSG2dTextCanvas* pTxn,
int x,
int y,
int cl,
u32 flags,
const NNSG2dChar* txt
);
pTxn | [IN] Pointer to TextCanvas |
x | [IN] Coordinate of reference point (in CharCanvas coordinate system) for text-string drawing |
y | [IN] Coordinate of reference point (in CharCanvas coordinate system) for text-string drawing |
cl | [IN] Standard color No. to use for text-string drawing |
flags | [IN] Drawing flags |
txt | [IN] Pointer to text string |
None.
Draws a text string, with the reference point for drawing defined by (x, y). If the text string includes '\n' (0x0A), the string is drawn with a line feed at that location.
flags can be specified with any combination of these flags:
Horizontal Reference-Point PlacementNNS_G2D_HORIZONTALORIGIN_LEFT | Use the left end of the text string as the reference point for drawing. |
NNS_G2D_HORIZONTALORIGIN_CENTER | Use the middle of the text string as the reference point for drawing. |
NNS_G2D_HORIZONTALORIGIN_RIGHT | Use the right end of the text string as the reference point for drawing. |
NNS_G2D_VERTICALORIGIN_TOP | Use the top of the text string as the reference point for drawing. |
NNS_G2D_VERTICALORIGIN_MIDDLE | Use the middle of the text string as the reference point for drawing. |
NNS_G2D_VERTICALORIGIN_BOTTOM | Use the bottom of the text string as the reference point for drawing. |
NNS_G2D_HORIZONTALALIGN_LEFT | When text string comprises multiple lines, draw with all lines aligned left. |
NNS_G2D_HORIZONTALALIGN_CENTER | When text string comprises multiple lines, draw with all lines centered. |
NNS_G2D_HORIZONTALALIGN_RIGHT | When text string comprises multiple lines, draw with all lines aligned right. |
Horizontal and vertical are swapped for vertically written fonts.
2007/03/14 Added support for vertically written/vertically held fonts.
2005/05/25 Initial version.
CONFIDENTIAL