#include <mathplot.h>
Public Member Functions | |
mpFY (wxString name=wxEmptyString, int flags=mpALIGN_TOP) | |
virtual double | GetX (double y)=0 |
virtual void | Plot (wxDC &dc, mpWindow &w) |
Protected Attributes | |
int | m_flags |
Holds label alignment. |
Abstract base class providing plot and labeling functionality for functions F:Y->X. Override mpFY::GetX to implement a function. Optionally implement a constructor and pass a name (label) and a label alignment to the constructor mpFY::mpFY. If the layer name is empty, no label will be plotted.
mpFY::mpFY | ( | wxString | name = wxEmptyString , |
|
int | flags = mpALIGN_TOP | |||
) |
name | Label | |
flags | Label alignment, pass one of mpALIGN_BOTTOM, mpALIGN_CENTER, mpALIGN_TOP. |
References mpLAYER_PLOT.
virtual double mpFY::GetX | ( | double | y | ) | [pure virtual] |
Get function value for argument. Override this function in your implementation.
y | Argument |
Referenced by Plot().
void mpFY::Plot | ( | wxDC & | dc, | |
mpWindow & | w | |||
) | [virtual] |
Layer plot handler. This implementation will plot the function in the visible area and put a label according to the aligment specified.
Implements mpLayer.
References mpWindow::GetMarginBottom(), mpWindow::GetMarginLeft(), mpWindow::GetMarginRight(), mpWindow::GetMarginTop(), mpWindow::GetScrX(), mpWindow::GetScrY(), GetX(), mpLayer::m_drawOutsideMargins, m_flags, mpLayer::m_font, mpLayer::m_name, mpLayer::m_pen, mpLayer::m_showName, mpLayer::m_visible, mpALIGN_CENTER, mpALIGN_TOP, mpALIGNMASK, mpWindow::p2y(), and mpWindow::x2p().
int mpFY::m_flags [protected] |
Holds label alignment.
Referenced by Plot().