#include <mathplot.h>
Public Member Functions | |
mpText (wxString name=wxT("Title"), int offsetx=5, int offsety=50) | |
virtual void | Plot (wxDC &dc, mpWindow &w) |
virtual bool | HasBBox () |
Protected Attributes | |
int | m_offsetx |
Holds offset for X in percentage. | |
int | m_offsety |
Holds offset for Y in percentage. |
Plot layer implementing a text string. The text is plotted using a percentage system 0-100%, so the actual coordinates for the location are not required, and the text stays on the plot reguardless of the other layers location and scaling factors.
mpText::mpText | ( | wxString | name = wxT("Title") , |
|
int | offsetx = 5 , |
|||
int | offsety = 50 | |||
) |
name | text to be drawn in the plot | |
offsetx | holds offset for the X location in percentage (0-100) | |
offsety | holds offset for the Y location in percentage (0-100) | |
name | text to be displayed | |
offsetx | x position in percentage (0-100) | |
offsetx | y position in percentage (0-100) |
References mpLAYER_INFO.
virtual bool mpText::HasBBox | ( | ) | [inline, virtual] |
void mpText::Plot | ( | wxDC & | dc, | |
mpWindow & | w | |||
) | [virtual] |
Text Layer plot handler. This implementation will plot text adjusted to the visible area.
mpText Layer plot handler. This implementation will plot the text adjusted to the visible area.
Implements mpLayer.
References mpWindow::GetMarginBottom(), mpWindow::GetMarginLeft(), mpWindow::GetMarginRight(), mpWindow::GetMarginTop(), mpLayer::GetName(), mpWindow::GetScrX(), mpWindow::GetScrY(), mpLayer::m_font, m_offsetx, m_offsety, mpLayer::m_pen, and mpLayer::m_visible.
int mpText::m_offsetx [protected] |
Holds offset for X in percentage.
Referenced by Plot().
int mpText::m_offsety [protected] |
Holds offset for Y in percentage.
Referenced by Plot().