# NNS_G2dCharCanvasDrawGlyph

## Syntax

      #include <nnsys/g2d/g2d_CharCanvas.h>

      void NNS_G2dCharCanvasDrawGlyph(
      	const NNSG2dCharCanvas* pCC,
      	const NNSG2dFont* pFont,
      	int x,
      	int y,
      	int cl,
      	const NNSG2dGlyph* pGlyph
      );

## Arguments

pCC | [IN] Pointer to CharCanvas
pFont | [IN] Pointer to font
x | [IN] Upper-left x coordinate of text character (in CharCanvas coordinate system)
y | [IN] Upper-left y coordinate of text character (in CharCanvas coordinate system)
cl | [IN] Standard color No. to use to draw the text character
pGlyph | [IN] Pointer to glyph to draw

## Return Values

None.

## Description

Draws the glyph pGlyph to the CharCanvas pCC using the font pFont. The text character gets drawn using transparent color and the required number of sequential colors from cl. For example, if the font is 3bpp (23=8 color) and 5 is specified for cl, then the 8 total number of colors used to draw the text character = the transparent color (color No. 0) and the color Nos. 5 to 11.

The coordinates are expressed in the CharCanvas coordinate system, where the upper-left corner of CharCanvas is (0,0). x and y must satisfy these inequalities: [text-character glyph width] < x < [CharCanvas region width]
[font height] < y < [CharCanvas region height]
The text character is drawn such that the (x, y) coordinates are positioned on the red dot in the figure below.

This function does not support vertically written or vertical hold fonts.

## See Also

`NNS_G2dCharCanvasDrawChar`

## Revision History

2007/03/14 Added a description of the vertically written/vertically hold fonts.
2005/05/25 Initial version.

CONFIDENTIAL