nw::font::CharWriter Class

Syntax

class CharWriter

Description

The class for drawing characters using the Font class

The nw::font::TextWriter class is used when also drawing strings.

Enumerated Types

GradationMode The enum representing types of gradation.

Member Constants

S DEFAULT_COLOR_MAPPING_MIN const u32
S DEFAULT_COLOR_MAPPING_MAX const u32

Member Functions

Constructors and Destructors
CharWriter Constructor.
~CharWriter Destructor.
Fonts
SetFont Sets the font.
GetFont Gets the font.
Character Drawing Preparation
SetupGX Prepares to draw characters.
S FinalizeGX Performs drawing configuration post-processing.
Linear conversion of glyph color.
SetColorMapping Sets the linear conversion for glyph colors used while drawing characters.
GetColorMappingMin Gets the value after conversion for 0 for each component used in linear conversion of the glyph color.
GetColorMappingMax Gets the value after conversion for 255 for each component used in linear conversion of the glyph color.
ResetColorMapping Sets the system to not perform linear conversion of glyph colors while drawing characters.
Character Color/Gradation
SetAlpha Sets the alpha value to be added when drawing characters.
GetAlpha Gets the alpha value to be added when drawing characters.
SetGradationMode Sets the gradation mode.
GetGradationMode Gets the gradation mode.
SetTextColor Sets the character and gradation color.
GetTextColor Gets the text character color.
GetGradationStartColor Gets the gradation start color.
GetGradationEndColor Gets the gradation end color.
Enlarging/Reducing Characters
SetScale Specifies the magnification ratio to use for a character.
GetScaleH Gets the horizontal magnification ratio of the character.
GetScaleV Gets the vertical magnification ratio of the character.
SetFontSize Specifies the character size.
GetFontWidth Returns the cell width after enlargement.
GetFontHeight Gets the cell height after enlargement.
GetFontAscent Gets the font ascent after magnification.
GetFontDescent Gets the font descent after magnification.
Drawing Fixed-Width Characters
EnableFixedWidth Setting to draw fixed-width characters.
IsWidthFixed Determines whether characters are drawn as fixed-width.
SetFixedWidth Specifies the character width to use when drawing fixed-width characters.
GetFixedWidth Specifies the character width to use when drawing fixed-width characters.
Text Drawing
Print Draws the characters.
DrawGlyph Draws glyphs.
Cursor
SetCursor Sets the cursor position to the new coordinate that has been specified.
MoveCursor Moves the cursor from its current position by the distance specified.
SetCursorX This function sets the x-coordinate of the cursor.
SetCursorY This function sets the y-coordinate of the cursor.
SetCursorZ This function sets the z-coordinate of the cursor.
MoveCursorX Moves the cursor from its current position by the distance specified.
MoveCursorY Moves the cursor from its current position by the distance specified.
MoveCursorZ Moves the cursor from its current position by the distance specified.
GetCursorX This function gets the x-coordinate of the cursor.
GetCursorY This function gets the y-coordinate of the cursor.
GetCursorZ This function gets the z-coordinate of the cursor.
Set/Get Shader-related
GetTextWriterResource Gets the TextWriterResource instance.
SetTextWriterResource Sets the TextWriterResourceinstance.
Buffer for character string display
GetDispStringBuffer Gets the buffer for displaying a string.
SetDispStringBuffer Sets the buffer for displaying a string. When NULL is set, the string display buffer is no longer in use
StartPrint Starts drawing of the character string. Used when a buffer has been configured for string display.
EndPrint Ends drawing of the character string. Used when a buffer has been configured for string display.
UseCommandBuffer Adds the string display-use command buffer to the current command list.
S GetDispStringBufferSize Calculates the size of the buffer for string display.
S InitDispStringBuffer Initializes a buffer for string display.

Revision History

2009/11/09
Initial version.

CONFIDENTIAL