NNS_G2D_UNICODE

Definition

#include <nnsys/g2d/g2di_Char.h>

#ifdef NNS_G2D_UNICODE
#define NNS_G2D_TRANSCODE(str)  L##str
typedef wchar_t NNSG2dChar;
#else
#define NNS_G2D_TRANSCODE(str)  str
typedef char NNSG2dChar;
#endif

Description

Switches the kind of characters that will be handled by the text-string process.

When NNS_G2D_UNICODE is not defined, characters are handled as char. When it is defined, characters are handled as wchar_t. If you want the text to be represented as unicode, define NNS_G2D_UNICODE before including the header file.

Switching the character type does not require rebuilding the library.

Sample code

// Use Unicode
#define NNS_G2D_UNICODE
#include <nitro.h>
#include <nnsys/g2d/g2d_Font.h> #include <nnsys/g2d/g2d_CharCanvas.h> #include <nnsys/g2d/g2d_TextCanvas.h> // .....

See Also

Revision History

05/25/2005 Initial version.


CONFIDENTIAL