#include <FXAxis.h>
Public Types | |
enum | Orientation { Bottom = 0x0001, Left = 0x0002, Right = 0x0004, Top = 0x0008 } |
Possible orientation of a Axis. | |
enum | Style { Linear = 0x0010, Logarithimic = 0x0020 } |
Axis style. | |
enum | Status { Enabled = 0x0100, Disabled = 0x0200 } |
Axis status. | |
enum | GridFlags { MinorThicks = 0x1000, MajorThicks = 0x2000, MinorGrid = 0x4000, MajorGrid = 0x8000 } |
Grid flags. | |
Public Member Functions | |
FXAxis (FXPlot2D *p, FXint flags=Bottom|Enabled|Linear|MajorThicks) | |
Constructor. | |
virtual | ~FXAxis () |
Destructor. | |
FXint | transform (double value) const |
Transforms the given double value to the int (pixel) point. | |
double | backTransform (FXint y) const |
Backward trasnformation of coordinates (from pixel to double). | |
FXbool | contains (double value) const |
Checks if the given point is within the current axis range. | |
void | recalcule (void) |
Recalculate the axis conversion factors. | |
double | getMin () const |
Return the lower value of the double range. | |
double | getMax () const |
Return the upper limit of the double range. | |
void | setRange (double min, double max) |
Set the range that the Axis will cover. | |
void | setPosition (FXPoint p1, FXPoint p2) |
Set the axis position on the Plot2D. | |
void | zoomIn (FXint x) |
Zomms the axis in around the given point. | |
void | zoomOut (void) |
Zomms the axis out. | |
void | drawSelf (FXDC *dc, FXint rootx, FXint rooty) |
Draw itself on the device context. | |
void | setFlags (FXint flag) |
Set the axis flags. | |
FXint | getFlags (void) const |
The axis flags. | |
void | setLabel (const FXString &name) |
Set the label of the Axis. | |
const FXString & | getLabel () const |
Retrun the label of the Axis. | |
FXint | getDefaultHeight () |
FXint | getDefaultWidth () |
void | create () |
Protected Member Functions | |
void | buildThicksLinear () |
Adjusts the limits and builds the thicks for the linear case. | |
void | buildThicksLog () |
Adjusts the limits and builds the thicks for the logarithmic case. | |
Protected Attributes | |
FXPlot2D * | plot |
The plot were this axis exists. | |
double | min |
The lower double value. | |
double | max |
The uppder double value. | |
double | step |
The step for the marks. | |
double | minmark |
The start value for the marks. | |
double | maxmark |
The last value for the marks. | |
double | cnv |
The conversion factor. | |
FXPoint | p1 |
The points of the axis position. | |
FXPoint | p2 |
FXint | y1 |
The output transformation points. | |
FXint | y2 |
FXint | prec |
FXuint | maxMajor |
Maximun number of major ticks. | |
FXuint | maxMinor |
Maximun number of minor ticks. | |
FXint | markwidth |
The mark width. | |
FXFont * | font |
Default font. | |
FXFont * | fontmini |
Font for the exponents. | |
std::vector< FXAxisMark > | marks |
The marks of the axis. | |
FXint | flags |
The flags Orientation, Style, Status and GirdFlags. | |
FXString | label |
Axis label. |
To plot a FXCurve in a FXPlot2D it has to be attached to tow FXAxis. The FXAxis class provides the relation between the data holded by the FXCurve and the pixes that the curve will draw. Furthermore, the FXAxis draws itself on the plot to give scale informations.
Definition at line 56 of file FXAxis.h.
|
Constructor. Create a new Axis on the Plot2D p, with a given OrientationType orientation and a flag enable. |
|
Backward trasnformation of coordinates (from pixel to double).
|
|
Checks if the given point is within the current axis range.
|
|
Return the upper limit of the double range.
|
|
Return the lower value of the double range.
|
|
Set the axis position on the Plot2D. This function should be called by the layout algorithm of the Plot2D. The points given here are used by transform() and to draw the Axis. |
|
Set the range that the Axis will cover. The range is used to transform() a given value to its pixel (integer) equivalent. |
|
Zomms the axis in around the given point. This function changes the range covered by the axis.
|
|
Zomms the axis out. This function changes the range covered by the axis. |