Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Protected Attributes
mpText Class Reference

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.

#include <mrpt/otherlibs/mathplot/mathplot.h>

Inheritance diagram for mpText:
Inheritance graph
[legend]

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)
 Text Layer plot handler.
virtual bool HasBBox ()
 mpText should not be used for scaling decisions.

Protected Attributes

int m_offsetx
 Holds offset for X in percentage.
int m_offsety
 Holds offset for Y in percentage.

Constructor & Destructor Documentation

mpText::mpText ( wxString  name = wxT("Title"),
int  offsetx = 5,
int  offsety = 50 
)
Parameters:
nametext to be drawn in the plot
offsetxholds offset for the X location in percentage (0-100)
offsetyholds offset for the Y location in percentage (0-100)

Member Function Documentation

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

mpText should not be used for scaling decisions.

Reimplemented from mpLayer.

Definition at line 1390 of file mathplot.h.

virtual void mpText::Plot ( wxDC &  dc,
mpWindow &  w 
) [virtual]

Text Layer plot handler.

This implementation will plot text adjusted to the visible area.

Implements mpLayer.


Member Data Documentation

int mpText::m_offsetx [protected]

Holds offset for X in percentage.

Definition at line 1393 of file mathplot.h.

int mpText::m_offsety [protected]

Holds offset for Y in percentage.

Definition at line 1394 of file mathplot.h.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Sun Oct 16 12:16:33 UTC 2011