DrawText

DrawText
Scaleform::GFx::DrawText
Declaration
class DrawText : public RefCountBaseNTS<DrawText, StatMV_Text_Mem>;
Description

DrawText provides external text drawing functionality in Scaleform. Users may use this class in conjunction with DrawTextManager to draw their own text without loading SWF/GFx files. 

DrawTextManager::CreateText or DrawTextManager::CreateHtmlText should be used to create an instance of DrawText:  

   Ptr<DrawText> ptxt = *pdm->CreateText("FHWEUHF!", RectF(20, 20, 500, 400));

   Ptr<DrawText> ptxt3 = *pdm->CreateHtmlText("<p><FONT size='20'>AB <b>singleline</b><i> CD</i>O", RectF(20, 300, 400, 700));

   Call pdm->Capture() after making the DrawText instance changes.

See DrawText sample for more details on the DrawText API.

Enumerations
Enumeration 
Description 
Supported anti-alias mode types - Anti-alias mode for animation or Anti-alias mode for readability. 
The horizontal alignment type of the text object. The default alignment of the text is left. 
The font style used for formatting the text object. 
Vertical alignment type of the text object. The default text alignment is top. 
Enumeration of supported filters. 
Describes the bit flags for filters. 
Methods
Method 
Description 
Removes all filters from the text. 
Returns the currently set anti-aliasing mode for the text object. 
Returns horizontal text alignment. 
Returns the currently set background color. 
Returns the currently set border color. 
Obtains the current depth of the text object. 
Returns the current color transformation matrix used with the text object. 
Returns currently set text in HTML format. 
Returns the current transformation matrix used with the text object. 
Returns current view rectangle used. 
Returns currently set text in UTF-8 format. 
Returns vertical text alignment. 
Determines whether the text is multi-line or single-line. 
Determines whether the text is visible or invisible. 
Determines whether the wordwrap feature is turned on/off for the text object. 
Sets the anti-alias mode for the text object. 
Sets horizontal text alignment. 
Sets color of background under the text. 
Sets color of border around the text. 
Sets color (R, G, B, A) to whole text or to a part of text. 
Sets color transformation matrix to the text object. 
Changes the draw order for the DrawText instance. 
Sets font to whole text or to a part of text. 
Sets font size to the whole text or to a part of text 
Sets font style to the whole text or to a part of text. 
Sets filters on the text. 
Parses UTF-8, UCS-2 or String encoded HTML and initializes the text object by the parsed HTML text. 
Sets transformation matrix to the text object. 
Sets letter spacing to whole text or to the part of text in interval [startPos..endPos]. 
Sets multi-line or single-line type of the text. 
Sets view rectangle, coordinates are in pixels. 
Sets the UTF-8, UCS-2, or String text value to the text object. 
Sets the visibility property of the text object. 
Sets or clears underline to whole text or to a part of text. 
Sets vertical text alignment. 
Turns wordwrapping feature on/off for the text object. 
Structures
Structure 
Description 
A structure defining a filter. 
File

GFx_DrawText.h