The ITextGeometry graph node interface.
This interface represents a renderable text object, which makes use of either a read-only Resource::IFont object representing a collection of individual glyph positions in a corresponding font atlas bitmap image, or a system font with a given ID.
To correctly display any given text using a bitmap font, the following prerequisites must be met:
- The ITextGeometry node must reference a given Resource::IFont object containing bitmap glyph rectangles.
- There must be an active material used for rendering the font at the material state slot with given index ("materialSlot" attribute, see Graph::IDrawable::SetMaterialSlot()).
- There must be an active texture containing the actual bitmap glyphs corresponding to the Resource::IFont used, at the texture state slot given via the "textureSlots" attribute or the Graph::IDrawable::SetTextureSlot() method. The texture state unit depends on the actual program used for the material.
To display a given text using an embedded outline font, the following settings are needed:
- The ITextGeometry node must reference a given Resource::IFont object containig valid outlines
- The "fontSize" attribute must specify a non-zero positive font size.
To display a given text using a system font, the following settings are needed:
- The "systemFontName" attribute must be set to a valid system font ID, e.g. "SansRegular"
- The "fontSize" attribute must specify a non-zero positive font size.
Use the Graph::IText base interface to access common text properties, such as spacing or leading, or the actual text to be shown.
Use the Graph::IScalable base interface to set an overall scaling factor for the object, i.e. define its actual size.
|
virtual INode * | GetNodeInterface ()=0 |
| Get the mutable Graph::INode interface. More...
|
|
virtual const INode * | GetNodeInterface () const =0 |
| Get the constant Graph::INode interface. More...
|
|
virtual ITransform * | GetTransformInterface ()=0 |
| Get the mutable Graph::ITransform interface. More...
|
|
virtual const ITransform * | GetTransformInterface () const =0 |
| Get the constant Graph::ITransform interface. More...
|
|
virtual Bool | SetNumberOfReservedCharacters (UInt32 numReserved)=0 |
| Set the number of characters to reserve. More...
|
|
virtual UInt32 | GetNumberOfReservedCharacters () const =0 |
| Get the number of characters currently reserved. More...
|
|
virtual Bool | SetContainerSize (Real sizeX, Real sizeY)=0 |
| Set the text node's container size. More...
|
|
virtual Bool | SetContainerSizeX (Real sizeX)=0 |
| Set the text node's horizontal container size. More...
|
|
virtual Bool | SetContainerSizeY (Real sizeY)=0 |
| Set the text node's vertical container size. More...
|
|
virtual Real | GetContainerSizeX () const =0 |
| Get the text node's horizontal container size. More...
|
|
virtual Real | GetContainerSizeY () const =0 |
| Get the text node's vertical container size. More...
|
|
virtual Bool | SetContainerFittingEnabled (Bool enabled)=0 |
| Enable/disable container fitting. More...
|
|
virtual Bool | IsContainerFittingEnabled () const =0 |
| Check if container fitting is enabled. More...
|
|
virtual Bool | SetAlignmentUnit (Real unitX, Real unitY)=0 |
| Set the text alignment unit. More...
|
|
virtual Bool | SetAlignmentUnitX (Real unitX)=0 |
| Set the horizontal text alignment unit. More...
|
|
virtual Bool | SetAlignmentUnitY (Real unitY)=0 |
| Set the vertical text alignment unit. More...
|
|
virtual Real | GetAlignmentUnitX () const =0 |
| Get the horizontal text alignment unit. More...
|
|
virtual Real | GetAlignmentUnitY () const =0 |
| Get the vertical text alignment unit. More...
|
|
virtual Bool | SetContainerAlignment (IEnums::AlignmentX alignmentX, IEnums::AlignmentY alignmentY)=0 |
| Set the container alignment. More...
|
|
virtual Bool | SetContainerAlignmentX (IEnums::AlignmentX alignmentX)=0 |
| Set the horizontal container alignment. More...
|
|
virtual Bool | SetContainerAlignmentY (IEnums::AlignmentY alignmentY)=0 |
| Set the vertical container alignment. More...
|
|
virtual IEnums::AlignmentX | GetContainerAlignmentX () const =0 |
| Get the horizontal container alignment. More...
|
|
virtual IEnums::AlignmentY | GetContainerAlignmentY () const =0 |
| Get the vertical container alignment. More...
|
|
virtual Bool | SetObjectBoundingMode (IEnums::ObjectBoundingMode modeX, IEnums::ObjectBoundingMode modeY)=0 |
| Set the object bounding mode. More...
|
|
virtual Bool | SetObjectBoundingModeX (IEnums::ObjectBoundingMode modeX)=0 |
| Set the horizontal object bounding mode. More...
|
|
virtual Bool | SetObjectBoundingModeY (IEnums::ObjectBoundingMode modeY)=0 |
| Set the vertical object bounding mode. More...
|
|
virtual IEnums::ObjectBoundingMode | GetObjectBoundingModeX () const =0 |
| Get the horizontal object bounding mode. More...
|
|
virtual IEnums::ObjectBoundingMode | GetObjectBoundingModeY () const =0 |
| Get the vertical object bounding mode. More...
|
|
virtual Bool | SetBorder (Real borderX, Real borderY)=0 |
| Set the horizontal and vertical borders used for alignment. More...
|
|
virtual Bool | SetBorderX (Real borderX)=0 |
| Set the horizontal border used for alignment. More...
|
|
virtual Bool | SetBorderY (Real borderY)=0 |
| Set the vertical border used for alignment. More...
|
|
virtual Real | GetBorderX () const =0 |
| Get the horizontal border used for alignment. More...
|
|
virtual Real | GetBorderY () const =0 |
| Get the vertical border used for alignment. More...
|
|
virtual Bool | SetOffset (Real offsetX, Real offsetY)=0 |
| Set horizontal and vertical offsets used for outline rendering. More...
|
|
virtual Bool | SetOffsetX (Real offsetX)=0 |
| Set the horizontal offset used for outline rendering. More...
|
|
virtual Bool | SetOffsetY (Real offsetY)=0 |
| Set the vertical offset used for outline rendering. More...
|
|
virtual Real | GetOffsetX () const =0 |
| Get the horizontal offset used for outline rendering. More...
|
|
virtual Real | GetOffsetY () const =0 |
| Get the vertical offset used for outline rendering. More...
|
|
virtual Bool | SetPixelFormat (IEnums::PixelFormat pixelFormat)=0 |
| Set the underlying texture's actual pixel format for outline fonts. More...
|
|
virtual IEnums::PixelFormat | GetPixelFormat () const =0 |
| Get the underlying texture's actual pixel format. More...
|
|
virtual Bool | IsCharacterPrintable (const Char *utf8Char) const =0 |
| Check if a given UTF8 character sequence is printable. More...
|
|
virtual Bool | IsCharacterPrintable (const String &utf8Char) const =0 |
| Check if a given UTF8 character sequence is printable. More...
|
|
virtual Bool | SetPrescalingEnabled (Bool enabled)=0 |
| Enable/disable prescaling if the text geometry is rendering to a texture. More...
|
|
virtual Bool | IsPrescalingEnabled () const =0 |
| Check if prescaling is enabled. More...
|
|
virtual Bool | SetNonPowerOfTwoTextureAllowed (Bool allowed)=0 |
| Allow/disallow the use of a NPOT texture if outline fonts are used. More...
|
|
virtual Bool | IsNonPowerOfTwoTextureAllowed () const =0 |
| Check if the use of a NPOT texture for outline fonts is allowed. More...
|
|
virtual Bool | SetVerticesSlot (SInt32 slot)=0 |
| Set the vertices slot used for rendering. More...
|
|
virtual SInt32 | GetVerticesSlot () const =0 |
| Get the vertices slot used for rendering. More...
|
|
virtual Bool | SetMaterialSlot (SInt32 slot)=0 |
| Set the material slot used for rendering. More...
|
|
virtual SInt32 | GetMaterialSlot () const =0 |
| Get the material slot used for rendering. More...
|
|
virtual Bool | SetParametersSlot (SInt32 slot)=0 |
| Set the parameters slot used for rendering. More...
|
|
virtual SInt32 | GetParametersSlot () const =0 |
| Get the parameters slot used for rendering. More...
|
|
virtual Bool | SetTextureSlot (UInt32 unit, SInt32 slot)=0 |
| Set a texture slot used for rendering. More...
|
|
virtual SInt32 | GetTextureSlot (UInt32 unit) const =0 |
| Get a texture slot used for rendering. More...
|
|
virtual Bool | SetBufferAccessMode (IEnums::BufferAccessMode mode)=0 |
| Set the buffer access mode. More...
|
|
virtual IEnums::BufferAccessMode | GetBufferAccessMode () const =0 |
| Get the buffer access mode. More...
|
|
virtual Bool | SetPrimitiveType (IEnums::PrimitiveType type)=0 |
| Set the primitive type used for rendering. More...
|
|
virtual IEnums::PrimitiveType | GetPrimitiveType () const =0 |
| Get the primitive type used for rendering. More...
|
|
virtual Bool | SetMaxNumberOfLightStages (UInt32 maxNumStages)=0 |
| Set the maximum number of light stages used for rendering. More...
|
|
virtual UInt32 | GetMaxNumberOfLightStages () const =0 |
| Get the maximum number of light stages used for rendering. More...
|
|
virtual Bool | SetMaxNumberOfBonesPerVertex (UInt32 maxNumBones)=0 |
| Set the maximum number of bones per vertex for vertex skinning. More...
|
|
virtual UInt32 | GetMaxNumberOfBonesPerVertex () const =0 |
| Get the maximum number of bones per vertex for vertex skinning. More...
|
|
virtual Bool | SetViewCullingEnabled (Bool enabled)=0 |
| Enable/disable view culling. More...
|
|
virtual Bool | IsViewCullingEnabled () const =0 |
| Check if view culling is enabled. More...
|
|
virtual Bool | SetDynamicBatchingAllowed (Bool allowed)=0 |
| Allow/disallow dynamic batching. More...
|
|
virtual Bool | IsDynamicBatchingAllowed () const =0 |
| Check if dynamic batching is allowed. More...
|
|
virtual Bool | SetCpuSkinningEnabled (Bool enabled)=0 |
| Enable/disable CPU vertex skinning. More...
|
|
virtual Bool | IsCpuSkinningEnabled () const =0 |
| Check if CPU vertex skinning is enabled. More...
|
|
virtual IFontResourceTarget * | GetFontResourceTarget ()=0 |
| Get a mutable Graph::IFontResourceTarget container. More...
|
|
virtual const IFontResourceTarget * | GetFontResourceTarget () const =0 |
| Get a constant Graph::IFontResourceTarget container. More...
|
|
virtual Bool | SetSystemFontName (const String &fontName)=0 |
| Set the ID of the system font used to render the text. More...
|
|
virtual const String & | GetSystemFontName () const =0 |
| Get the ID of the system font used to render the text. More...
|
|
virtual Bool | SetFontType (IEnums::FontType fontType)=0 |
| Set the type of font used for rendering. More...
|
|
virtual IEnums::FontType | GetFontType () const =0 |
| Get the type of font used for rendering. More...
|
|
virtual Bool | SetFontSize (Real fontSize)=0 |
| Set the font size. More...
|
|
virtual Real | GetFontSize () const =0 |
| Get the font size. More...
|
|
virtual Bool | SetTextColor (const Color &textColor)=0 |
| Set the foreground (text) color used for rendering the text. More...
|
|
virtual const Color & | GetTextColor () const =0 |
| Get the text color. More...
|
|
virtual Bool | SetBackgroundColor (const Color &backgroundColor)=0 |
| Set the background color used for rendering. More...
|
|
virtual const Color & | GetBackgroundColor () const =0 |
| Get the background color. More...
|
|
virtual ITextNodeTarget * | GetParentTextNodeTarget ()=0 |
| Get the optional mutable Graph::ITextNodeTarget parent container. More...
|
|
virtual const ITextNodeTarget * | GetParentTextNodeTarget () const =0 |
| Get the optional constant Graph::ITextNodeTarget parent container. More...
|
|
virtual ITextureNodeTarget * | GetOutputTextureNodeTarget ()=0 |
| Get the optional mutable output Graph::ITextureNodeTarget container. More...
|
|
virtual const ITextureNodeTarget * | GetOutputTextureNodeTarget () const =0 |
| Get the optional constant output Graph::ITextureNodeTarget container. More...
|
|
virtual ITextResourceTarget * | GetTextResourceTarget ()=0 |
| Get a mutable Graph::ITextResourceTarget container. More...
|
|
virtual const ITextResourceTarget * | GetTextResourceTarget () const =0 |
| Get a constant Graph::ITextResourceTarget container. More...
|
|
virtual Bool | SetText (const String &text)=0 |
| Set the text to be displayed. More...
|
|
virtual const String & | GetText () const =0 |
| Get the displayed text. More...
|
|
virtual Bool | SetSpacing (Real spacing)=0 |
| Set the character spacing value. More...
|
|
virtual Real | GetSpacing () const =0 |
| Get the character spacing value. More...
|
|
virtual Bool | SetLeading (Real leading)=0 |
| Set the leading value. More...
|
|
virtual Real | GetLeading () const =0 |
| Get the leading value. More...
|
|
virtual Bool | SetEmbolding (Real strength)=0 |
| Set the embolding strength value. More...
|
|
virtual Real | GetEmbolding () const =0 |
| Get the embolding strength value. More...
|
|
virtual Bool | SetBlur (Real strength)=0 |
| Set the blur strength value. More...
|
|
virtual Real | GetBlur () const =0 |
| Get the blur strength value. More...
|
|
virtual Bool | SetSpaceWidthFactor (Real factor)=0 |
| Set the space width factor. More...
|
|
virtual Real | GetSpaceWidthFactor () const =0 |
| Get the space width factor. More...
|
|
virtual Bool | SetDigitWidthFactor (Real factor)=0 |
| Set the digit width factor. More...
|
|
virtual Real | GetDigitWidthFactor () const =0 |
| Get the digit width factor. More...
|
|
virtual Bool | SetSameDigitWidthEnabled (Bool enabled)=0 |
| Enable/disable unified digit width. More...
|
|
virtual Bool | IsSameDigitWidthEnabled () const =0 |
| Check if unified digit width is enabled. More...
|
|
virtual Bool | SetWordWrappingEnabled (Bool enabled)=0 |
| Enable/disable word wrapping. More...
|
|
virtual Bool | IsWordWrappingEnabled () const =0 |
| Check if word wrapping is enabled. More...
|
|
virtual Bool | SetTextAlignmentX (IEnums::TextAlignmentX alignment)=0 |
| Set the horizontal text alignment. More...
|
|
virtual IEnums::TextAlignmentX | GetTextAlignmentX () const =0 |
| Get the horizontal text alignment. More...
|
|
virtual Bool | SetTextAlignmentY (IEnums::TextAlignmentY alignment)=0 |
| Set the vertical text alignment. More...
|
|
virtual IEnums::TextAlignmentY | GetTextAlignmentY () const =0 |
| Get the vertical text alignment. More...
|
|
virtual Bool | QueryTextSize (const String &text, Real &sizeX, Real &sizeY) const =0 |
| Query the dimensions of a given UTF8 text. More...
|
|
virtual Bool | SetScaleFactor (const Vector &scaleFactor)=0 |
| Set individual scaling factors for the X, Y and Z axes. More...
|
|
virtual Bool | SetScaleFactor (Real x, Real y, Real z)=0 |
| Set individual scaling factors for the X, Y and Z axes. More...
|
|
virtual Bool | SetScaleFactor (Real s)=0 |
| Set a uniform scaling factor for all three axes. More...
|
|
virtual Bool | SetScaleFactorX (Real x)=0 |
| Set the scaling factor for the X axis only. More...
|
|
virtual Bool | SetScaleFactorY (Real y)=0 |
| Set the scaling factor for the Y axis only. More...
|
|
virtual Bool | SetScaleFactorZ (Real z)=0 |
| Set the scaling factor for the Z axis only. More...
|
|
virtual const Vector & | GetScaleFactor () const =0 |
| Get the scaling factors for the X, Y and Z axes. More...
|
|
virtual Real | GetScaleFactorX () const =0 |
| Get the scaling factor for the X axis. More...
|
|
virtual Real | GetScaleFactorY () const =0 |
| Get the scaling factor for the Y axis. More...
|
|
virtual Real | GetScaleFactorZ () const =0 |
| Get the scaling factor for the Z axis. More...
|
|