mpText Class Reference

#include <mathplot.h>

Inheritance diagram for mpText:
mpLayer

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

mpText::mpText ( wxString  name = wxT("Title"),
int  offsetx = 5,
int  offsety = 50 
)
Parameters:
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.


Member Function Documentation

virtual bool mpText::HasBBox (  )  [inline, virtual]

mpText should not be used for scaling decisions.

Reimplemented from mpLayer.

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.


Member Data Documentation

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().


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

© 2003 David Schalig, 2007-2008 Davide Rondini. Generated on Sun Dec 13 12:39:25 2009 for wxMathPlot with Doxygen. Hosted on SourceForge.net Logo