Drag[en]gine Game Engine  1.0
deCanvasText Class Reference

Canvas rendering a text. More...

#include <deCanvasText.h>

Inheritance diagram for deCanvasText:
deCanvas deResource deObject

Public Member Functions

Management
deFontGetFont () const
 Font or NULL if not set. More...
 
void SetFont (deFont *font)
 Set font or NULL to unset. More...
 
float GetFontSize () const
 Font size in canvas units. More...
 
void SetFontSize (float size)
 Set font size in canvas units. More...
 
const decStringGetText () const
 Text. More...
 
void SetText (const char *text)
 Set text. More...
 
const decColorGetColor () const
 Text color. More...
 
void SetColor (const decColor &color)
 Set text color. More...
 
Visiting
virtual void Visit (deCanvasVisitor &visitor)
 Visit canvas. More...
 
- Public Member Functions inherited from deCanvas
const decPointGetPosition () const
 Position in parent canvas view units. More...
 
void SetPosition (const decPoint &position)
 Set position in parent canvas view units. More...
 
const decPointGetSize () const
 Size in parent canvas view units. More...
 
void SetSize (const decPoint &size)
 Set size in parent canvas view units. More...
 
const decTexMatrix2GetTransform () const
 Transformation matrix affecting the canvas and all its content. More...
 
void SetTransform (const decTexMatrix2 &transform)
 Set transformation matrix affecting the canvas and all its content. More...
 
const decColorMatrixGetColorTransform () const
 Transformation matrix affecting the canvas content color. More...
 
void SetColorTransform (const decColorMatrix &transform)
 Set transformation matrix affecting the canvas content color. More...
 
bool GetVisible () const
 Canvas is visible. More...
 
void SetVisible (bool visible)
 Set if canvas is visible. More...
 
float GetOrder () const
 Render order. Larger renders ontop of smaller. More...
 
void SetOrder (float order)
 Set render order. Larger renders ontop of smaller. More...
 
float GetTransparency () const
 Transparency in the range from 0 to 1 where 1 is opaque and 0 fully transparent. More...
 
void SetTransparency (float transparency)
 Set transparency in the range from 0 to 1 where 1 is opaque and 0 fully transparent. More...
 
eBlendModes GetBlendMode () const
 Blend mode used to blend canvas over previous content. More...
 
void SetBlendMode (eBlendModes blendMode)
 Set blend mode used to blend canvas over previous content. More...
 
void NotifyContentChanged ()
 Notify peers about changes to the canvas content. More...
 
deBaseGraphicCanvasGetPeerGraphic () const
 Graphic system peer object or NULL if not set. More...
 
void SetPeerGraphic (deBaseGraphicCanvas *peer)
 Set graphic system peer object or NULL if not set. More...
 
deCanvasViewGetParentView () const
 Parent view or NULL if not set. More...
 
void SetParentView (deCanvasView *view)
 Set parent view or NULL if not set. More...
 
deCanvasGetLLViewPrev () const
 Previous canvas in the parent view linked list or NULL if not set. More...
 
void SetLLViewPrev (deCanvas *canvas)
 Set next canvas in the parent view linked list or NULL if not set. More...
 
deCanvasGetLLViewNext () const
 Next canvas in the parent view linked list or NULL if not set. More...
 
void SetLLViewNext (deCanvas *canvas)
 Set next canvas in the parent view linked list NULL if not set. More...
 
 deCanvas (deCanvasManager *manager)
 Create canvas. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deCanvasText (deCanvasManager *manager)
 Create canvas. More...
 
virtual ~deCanvasText ()
 Clean up canvas. More...
 

Additional Inherited Members

- Public Types inherited from deCanvas
enum  eBlendModes { ebmBlend, ebmAdd }
 Blend modes used to blend canvas over previous content. More...
 
- Protected Member Functions inherited from deCanvas
virtual ~deCanvas ()
 Clean up canvas. More...
 
- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Canvas rendering a text.

Author
Pl├╝ss Roland
Version
1.0
Date
2015

Constructor & Destructor Documentation

◆ deCanvasText()

deCanvasText::deCanvasText ( deCanvasManager manager)

Create canvas.

◆ ~deCanvasText()

virtual deCanvasText::~deCanvasText ( )
protectedvirtual

Clean up canvas.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ GetColor()

const decColor& deCanvasText::GetColor ( ) const
inline

Text color.

References SetColor(), and Visit().

◆ GetFont()

deFont* deCanvasText::GetFont ( ) const
inline

Font or NULL if not set.

References SetFont().

◆ GetFontSize()

float deCanvasText::GetFontSize ( ) const
inline

Font size in canvas units.

References SetFontSize().

◆ GetText()

const decString& deCanvasText::GetText ( ) const
inline

Text.

References SetText().

◆ SetColor()

void deCanvasText::SetColor ( const decColor color)

Set text color.

Referenced by GetColor().

◆ SetFont()

void deCanvasText::SetFont ( deFont font)

Set font or NULL to unset.

Referenced by GetFont().

◆ SetFontSize()

void deCanvasText::SetFontSize ( float  size)

Set font size in canvas units.

Size is clamped to 0 or larger.

Referenced by GetFontSize().

◆ SetText()

void deCanvasText::SetText ( const char *  text)

Set text.

Referenced by GetText().

◆ Visit()

virtual void deCanvasText::Visit ( deCanvasVisitor visitor)
virtual

Visit canvas.

Reimplemented from deCanvas.

Referenced by GetColor().


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