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.

Definition at line 1377 of file mathplot.h.

#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:
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)

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.1 for MRPT 0.9.4 SVN: at Mon Jan 10 23:33:19 UTC 2011