#include <mathplot.h>
Public Member Functions | |
| mpFXY (wxString name=wxEmptyString, int flags=mpALIGN_NE) | |
| virtual void | Rewind ()=0 |
| virtual bool | GetNextXY (double &x, double &y)=0 |
| virtual void | Plot (wxDC &dc, mpWindow &w) |
Protected Member Functions | |
| void | UpdateViewBoundary (wxCoord xnew, wxCoord ynew) |
Protected Attributes | |
| int | m_flags |
| Holds label alignment. | |
| wxCoord | maxDrawX |
| wxCoord | minDrawX |
| wxCoord | maxDrawY |
| wxCoord | minDrawY |
Abstract base class providing plot and labeling functionality for a locus plot F:N->X,Y. Locus argument N is assumed to be in range 0 .. MAX_N, and implicitly derived by enumerating all locus values. Override mpFXY::Rewind and mpFXY::GetNextXY to implement a locus. Optionally implement a constructor and pass a name (label) and a label alignment to the constructor mpFXY::mpFXY. If the layer name is empty, no label will be plotted.
| mpFXY::mpFXY | ( | wxString | name = wxEmptyString, |
|
| int | flags = mpALIGN_NE | |||
| ) |
| name | Label | |
| flags | Label alignment, pass one of mpALIGN_NE, mpALIGN_NW, mpALIGN_SW, mpALIGN_SE. |
References mpLAYER_PLOT.
| virtual bool mpFXY::GetNextXY | ( | double & | x, | |
| double & | y | |||
| ) | [pure virtual] |
Get locus value for next N. Override this function in your implementation.
| x | Returns X value | |
| y | Returns Y value |
Implemented in mpFXYVector.
Referenced by Plot().
| void mpFXY::Plot | ( | wxDC & | dc, | |
| mpWindow & | w | |||
| ) | [virtual] |
Layer plot handler. This implementation will plot the locus in the visible area and put a label according to the alignment specified.
Implements mpLayer.
References mpWindow::GetMarginBottom(), mpWindow::GetMarginLeft(), mpWindow::GetMarginRight(), mpWindow::GetMarginTop(), GetNextXY(), mpWindow::GetScrX(), mpWindow::GetScrY(), mpLayer::m_continuous, mpLayer::m_drawOutsideMargins, m_flags, mpLayer::m_font, mpLayer::m_name, mpLayer::m_pen, mpLayer::m_showName, mpLayer::m_visible, maxDrawX, maxDrawY, minDrawX, minDrawY, mpALIGN_NE, mpALIGN_NW, mpALIGN_SE, mpALIGNMASK, Rewind(), UpdateViewBoundary(), mpWindow::x2p(), and mpWindow::y2p().
| virtual void mpFXY::Rewind | ( | ) | [pure virtual] |
Rewind value enumeration with mpFXY::GetNextXY. Override this function in your implementation.
Implemented in mpFXYVector.
Referenced by Plot().
| void mpFXY::UpdateViewBoundary | ( | wxCoord | xnew, | |
| wxCoord | ynew | |||
| ) | [protected] |
int mpFXY::m_flags [protected] |
wxCoord mpFXY::maxDrawX [protected] |
Referenced by Plot(), and UpdateViewBoundary().
wxCoord mpFXY::maxDrawY [protected] |
Referenced by Plot(), and UpdateViewBoundary().
wxCoord mpFXY::minDrawX [protected] |
Referenced by Plot(), and UpdateViewBoundary().
wxCoord mpFXY::minDrawY [protected] |
Referenced by Plot(), and UpdateViewBoundary().