# NNS_G2dCharCanvasDrawGlyph

## C Specification

      #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 total number of colors used to draw the text character = the transparent color (color No. 0) and the color Nos.

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 so that the (x, y) coordinates are positioned at the red dot in the figure below.

## See Also

`NNS_G2dCharCanvasDrawChar`

## Revision History

05/25/2005 Initial version.