VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtTextProxy Class Reference

A class for controlling text owned by the TextRenderer. More...

Public Member Functions

 DtTextProxy (DtTextRenderer *parent)
 CTOR.
DtTextProxyclone (DtTextRenderer *parent) const
 Clone the given DtTextProxy.
virtual ~DtTextProxy ()
 DTOR.
void setAlignment (DtFont::TextAlignement alignment)
 Set the position.
DtFont::TextAlignement alignment () const
 Returns alignment.
void setParent (DtTextRenderer *)
 Sets the parent of this proxy.
void setPosition (float x, float y, float z, float w=0)
 Set the position.
const float * position () const
 Returns positiuon.
void setRotation (float angle)
 Set the rotation.
float rotation () const
 Returns rotation.
void setColor (float r, float g, float b, float a)
 Set the color of the text.
const float * color () const
 Returns color.
void setString (const DtUnicode &str)
 Set the text string.
const DtUnicodestring () const
 Gets the text string.
void setFont (DtFontSP font)
 Set the font to render using.
DtFontSP font () const
 Get the font rendering.
Dt2dPoint calculateGlyphSize (const DtPen &pen, const DtUnicode &string, unsigned int pos=0, int len=-1)
 Calculate the bounding box for a string.
DtBoundingBox calculateBoundingBox (const DtPen &pen, const DtUnicode &string, unsigned int pos=0, int len=-1)
 Calculate the bounding box for a string.
void setBounds (const DtBoundingBox &box)
 Set the bounds of the text.
const DtBoundingBoxbounds () const
 Returns bounding box.
void setGroup (unsigned int group)
 Sets the text group.
unsigned int group () const
 Gets the group of the text.
virtual void renderText (DtTexturedGlyphRenderer *)
 Renders text using the layout renderer to the given glyph renderer.

Protected Member Functions

void makeOrChangeTextLayout (const DtUnicode &str)

Protected Attributes

DtTextRenderermyParent
float myRotation
float myPosition [4]
float myColor [4]
unsigned int myGroup
DtFont::TextAlignement myAlignment
DtUnicode myString
DtBoundingBox myBounds
DtFontSP myFont
DtTextLayoutInterfacemyTextLayout

Detailed Description

A class for controlling text owned by the TextRenderer.

Constructor & Destructor Documentation

makVrv::DtTextProxy::DtTextProxy ( DtTextRenderer parent)

CTOR.

virtual makVrv::DtTextProxy::~DtTextProxy ( )
virtual

DTOR.

Member Function Documentation

DtTextProxy* makVrv::DtTextProxy::clone ( DtTextRenderer parent) const

Clone the given DtTextProxy.

void makVrv::DtTextProxy::setAlignment ( DtFont::TextAlignement  alignment)

Set the position.

DtFont::TextAlignement makVrv::DtTextProxy::alignment ( ) const
inline

Returns alignment.

void makVrv::DtTextProxy::setParent ( DtTextRenderer )

Sets the parent of this proxy.

void makVrv::DtTextProxy::setPosition ( float  x,
float  y,
float  z,
float  w = 0 
)

Set the position.

const float* makVrv::DtTextProxy::position ( ) const

Returns positiuon.

void makVrv::DtTextProxy::setRotation ( float  angle)

Set the rotation.

float makVrv::DtTextProxy::rotation ( ) const

Returns rotation.

void makVrv::DtTextProxy::setColor ( float  r,
float  g,
float  b,
float  a 
)

Set the color of the text.

const float* makVrv::DtTextProxy::color ( ) const

Returns color.

void makVrv::DtTextProxy::setString ( const DtUnicode str)

Set the text string.

If this string is left to right will create a DtGenericTextLayoutRenderer to render the text, else will create a DtHarfbuzzTextRenderer to layout the text

const DtUnicode& makVrv::DtTextProxy::string ( ) const

Gets the text string.

void makVrv::DtTextProxy::setFont ( DtFontSP  font)

Set the font to render using.

DtFontSP makVrv::DtTextProxy::font ( ) const

Get the font rendering.

Dt2dPoint makVrv::DtTextProxy::calculateGlyphSize ( const DtPen pen,
const DtUnicode string,
unsigned int  pos = 0,
int  len = -1 
)

Calculate the bounding box for a string.

DtBoundingBox makVrv::DtTextProxy::calculateBoundingBox ( const DtPen pen,
const DtUnicode string,
unsigned int  pos = 0,
int  len = -1 
)

Calculate the bounding box for a string.

void makVrv::DtTextProxy::setBounds ( const DtBoundingBox box)

Set the bounds of the text.

const DtBoundingBox& makVrv::DtTextProxy::bounds ( ) const

Returns bounding box.

void makVrv::DtTextProxy::setGroup ( unsigned int  group)

Sets the text group.

unsigned int makVrv::DtTextProxy::group ( ) const

Gets the group of the text.

virtual void makVrv::DtTextProxy::renderText ( DtTexturedGlyphRenderer )
virtual

Renders text using the layout renderer to the given glyph renderer.

void makVrv::DtTextProxy::makeOrChangeTextLayout ( const DtUnicode str)
protected

Member Data Documentation

DtTextRenderer* makVrv::DtTextProxy::myParent
protected
float makVrv::DtTextProxy::myRotation
protected
float makVrv::DtTextProxy::myPosition[4]
protected
float makVrv::DtTextProxy::myColor[4]
protected
unsigned int makVrv::DtTextProxy::myGroup
protected
DtFont::TextAlignement makVrv::DtTextProxy::myAlignment
protected
DtUnicode makVrv::DtTextProxy::myString
protected
DtBoundingBox makVrv::DtTextProxy::myBounds
protected
DtFontSP makVrv::DtTextProxy::myFont
protected
DtTextLayoutInterface* makVrv::DtTextProxy::myTextLayout
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)