Power System Platform  2024w23a
Loading...
Searching...
No Matches
GCText Class Reference

Class to draw text on Graphics Context using wxWidgets. More...

#include <GCText.h>

Public Member Functions

 GCText (wxString text)
 
virtual void Draw (wxPoint2DDouble position, wxGraphicsContext *gc, double angle=0.0, wxColour colour= *wxBLACK) const
 Draw the text in wxGraphicsContext.
 
virtual GCTextGetCopy ()
 Get a deep text copy.
 
virtual void SetText (wxString text)
 Set correctly a new text string.
 
virtual wxString GetText () const
 
virtual int GetWidth () const
 
virtual int GetHeight () const
 
virtual void SetFontSize (int fontSize)
 
virtual void SetFontWeight (wxFontWeight fontWeight)
 
virtual void SetFontStyle (wxFontStyle fontStyle)
 
virtual void SetFontFamily (wxFontFamily fontFamily)
 

Protected Attributes

wxString m_text = _("Text")
 
int m_fontSize = 10
 
wxFontWeight m_fontWeight = wxFONTWEIGHT_NORMAL
 
wxFontStyle m_fontStyle = wxFONTSTYLE_NORMAL
 
wxFontFamily m_fontFamily = wxFONTFAMILY_DEFAULT
 
wxSize m_size
 

Detailed Description

Class to draw text on Graphics Context using wxWidgets.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
16/05/2024

Member Function Documentation

◆ Draw()

void GCText::Draw ( wxPoint2DDouble position,
wxGraphicsContext * gc,
double angle = 0.0,
wxColour colour = *wxBLACK ) const
virtual

Draw the text in wxGraphicsContext.

Parameters
positionText position.
gcGraphics Context.
angleText angle.
colourText colour.

◆ GetCopy()

GCText * GCText::GetCopy ( )
virtual

Get a deep text copy.

Warning
The original object is not freed.
Returns
New text pointer.

◆ SetText()

void GCText::SetText ( wxString text)
virtual

Set correctly a new text string.

Parameters
textNew text string.

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