Plot layer implementing a y-scale ruler.
If align is set to mpALIGN_CENTER, the ruler is fixed at X=0 in the coordinate system. If the align is set to mpALIGN_TOP or mpALIGN_BOTTOM, the axis is always drawn respectively at top or bottom of the window. A label is plotted at the top-right hand of the ruler. The scale numbering automatically adjusts to view and zoom factor.
Definition at line 747 of file mathplot.h.
#include <mrpt/otherlibs/mathplot/mathplot.h>

Public Member Functions | |
| mpScaleY (wxString name=wxT("Y"), int flags=mpALIGN_CENTER, bool ticks=true) | |
| virtual void | Plot (wxDC &dc, mpWindow &w) |
| Layer plot handler. | |
| virtual bool | HasBBox () |
| Check whether this layer has a bounding box. | |
| void | SetAlign (int align) |
| Set Y axis alignment. | |
| void | SetTicks (bool ticks) |
| Set Y axis ticks or grid. | |
| bool | GetTicks () |
| Get Y axis ticks or grid. | |
| void | SetLabelFormat (const wxString &format) |
| Set Y axis Label format. | |
| const wxString & | SetLabelFormat () |
| Get Y axis Label format. | |
Protected Attributes | |
| int | m_flags |
| Flag for axis alignment. | |
| bool | m_ticks |
| Flag to toggle between ticks or grid. | |
| wxString | m_labelFormat |
| Format string used to print labels. | |
| mpScaleY::mpScaleY | ( | wxString | name = wxT("Y"), |
| int | flags = mpALIGN_CENTER, |
||
| bool | ticks = true |
||
| ) |
| name | Label to plot by the ruler |
| flags | Set position of the scale respect to the window. |
| ticks | Select ticks or grid. Give TRUE (default) for drawing axis ticks, FALSE for drawing the grid |
| bool mpScaleY::GetTicks | ( | ) | [inline] |
Get Y axis ticks or grid.
Definition at line 776 of file mathplot.h.
| virtual bool mpScaleY::HasBBox | ( | ) | [inline, virtual] |
Check whether this layer has a bounding box.
This implementation returns FALSE thus making the ruler invisible to the plot layer bounding box calculation by mpWindow.
Reimplemented from mpLayer.
Definition at line 764 of file mathplot.h.
| virtual void mpScaleY::Plot | ( | wxDC & | dc, |
| mpWindow & | w | ||
| ) | [virtual] |
Layer plot handler.
This implementation will plot the ruler adjusted to the visible area.
Implements mpLayer.
| void mpScaleY::SetAlign | ( | int | align ) | [inline] |
Set Y axis alignment.
| align | alignment (choose between mpALIGN_BORDER_LEFT, mpALIGN_LEFT, mpALIGN_CENTER, mpALIGN_RIGHT, mpALIGN_BORDER_RIGHT) |
Definition at line 768 of file mathplot.h.
| void mpScaleY::SetLabelFormat | ( | const wxString & | format ) | [inline] |
Set Y axis Label format.
| format | The format string |
Definition at line 780 of file mathplot.h.
References mrpt::format().
| const wxString& mpScaleY::SetLabelFormat | ( | ) | [inline] |
| void mpScaleY::SetTicks | ( | bool | ticks ) | [inline] |
Set Y axis ticks or grid.
| ticks | TRUE to plot axis ticks, FALSE to plot grid. |
Definition at line 772 of file mathplot.h.
int mpScaleY::m_flags [protected] |
Flag for axis alignment.
Definition at line 784 of file mathplot.h.
wxString mpScaleY::m_labelFormat [protected] |
Format string used to print labels.
Definition at line 789 of file mathplot.h.
bool mpScaleY::m_ticks [protected] |
Flag to toggle between ticks or grid.
Definition at line 788 of file mathplot.h.
| Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011 |