VTK
|
takes care of drawing 2D axes More...
#include <vtkAxis.h>
Public Types | |
typedef vtkContextItem | Superclass |
enum | { LEFT = 0, BOTTOM, RIGHT, TOP, PARALLEL } |
enum | { STANDARD = 0, SCIENTIFIC, MIXED } |
enum | { AUTO = 0, FIXED, CUSTOM } |
![]() | |
typedef vtkAbstractContextItem | Superclass |
![]() | |
typedef vtkObject | Superclass |
![]() | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | SetMinimum (double minimum) |
virtual void | SetMaximum (double maximum) |
virtual void | SetRange (double minimum, double maximum) |
virtual void | SetMinimumLimit (double lowest) |
virtual void | SetMaximumLimit (double highest) |
virtual void | Update () |
virtual bool | Paint (vtkContext2D *painter) |
virtual void | AutoScale () |
virtual void | RecalculateTickSpacing () |
virtual vtkDoubleArray * | GetTickPositions () |
virtual void | SetTickPositions (vtkDoubleArray *positions) |
virtual vtkFloatArray * | GetTickScenePositions () |
virtual vtkStringArray * | GetTickLabels () |
virtual void | SetTickLabels (vtkStringArray *labels) |
vtkRectf | GetBoundingRect (vtkContext2D *painter) |
virtual void | SetPosition (int position) |
virtual int | GetPosition () |
void | SetPoint1 (const vtkVector2f &pos) |
void | SetPoint1 (float x, float y) |
virtual float * | GetPoint1 () |
virtual void | GetPoint1 (float &, float &) |
virtual void | GetPoint1 (float[2]) |
vtkVector2f | GetPosition1 () |
void | SetPoint2 (const vtkVector2f &pos) |
void | SetPoint2 (float x, float y) |
virtual float * | GetPoint2 () |
virtual void | GetPoint2 (float &, float &) |
virtual void | GetPoint2 (float[2]) |
vtkVector2f | GetPosition2 () |
virtual void | SetNumberOfTicks (int) |
virtual int | GetNumberOfTicks () |
virtual vtkTextProperty * | GetLabelProperties () |
virtual double | GetMinimum () |
virtual double | GetMaximum () |
virtual double | GetMinimumLimit () |
virtual double | GetMaximumLimit () |
virtual void | SetTitle (const vtkStdString &title) |
virtual vtkStdString | GetTitle () |
virtual vtkTextProperty * | GetTitleProperties () |
virtual void | SetLogScale (bool) |
virtual bool | GetLogScale () |
virtual void | SetGridVisible (bool) |
virtual bool | GetGridVisible () |
virtual void | SetLabelsVisible (bool) |
virtual bool | GetLabelsVisible () |
virtual void | SetPrecision (int precision) |
virtual int | GetPrecision () |
virtual void | SetNotation (int notation) |
virtual int | GetNotation () |
virtual void | SetBehavior (int) |
virtual int | GetBehavior () |
virtual vtkPen * | GetPen () |
virtual vtkPen * | GetGridPen () |
![]() | |
virtual double | GetOpacity () |
virtual void | SetOpacity (double) |
![]() | |
bool | PaintChildren (vtkContext2D *painter) |
virtual void | ReleaseGraphicsResources () |
unsigned int | AddItem (vtkAbstractContextItem *item) |
bool | RemoveItem (vtkAbstractContextItem *item) |
bool | RemoveItem (unsigned int index) |
vtkAbstractContextItem * | GetItem (unsigned int index) |
unsigned int | GetNumberOfItems () |
void | ClearItems () |
virtual bool | Hit (const vtkContextMouseEvent &mouse) |
virtual vtkAbstractContextItem * | GetPickedItem (const vtkContextMouseEvent &mouse) |
virtual bool | MouseEnterEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseMoveEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseLeaveEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseButtonPressEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseButtonReleaseEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseDoubleClickEvent (const vtkContextMouseEvent &mouse) |
virtual void | SetScene (vtkContextScene *scene) |
virtual void | SetParent (vtkAbstractContextItem *parent) |
virtual vtkVector2f | MapToParent (const vtkVector2f &point) |
virtual vtkVector2f | MapFromParent (const vtkVector2f &point) |
virtual vtkVector2f | MapToScene (const vtkVector2f &point) |
virtual vtkVector2f | MapFromScene (const vtkVector2f &point) |
virtual bool | MouseWheelEvent (const vtkContextMouseEvent &mouse, int delta) |
vtkContextScene * | GetScene () |
vtkAbstractContextItem * | GetParent () |
virtual bool | GetVisible () |
virtual void | SetVisible (bool) |
![]() | |
virtual void | DebugOn () |
virtual void | DebugOff () |
unsigned char | GetDebug () |
void | SetDebug (unsigned char debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
![]() | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &os) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkAxis * | SafeDownCast (vtkObject *o) |
static vtkAxis * | New () |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkContextItem * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkAbstractContextItem * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObject *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
![]() | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Protected Member Functions | |
vtkAxis () | |
~vtkAxis () | |
void | GenerateTickLabels (double min, double max) |
void | GenerateTickLabels () |
double | CalculateNiceMinMax (double &min, double &max) |
double | NiceNumber (double number, bool roundUp) |
double | LogScaleTickMark (double number, bool roundUp, bool &niceValue, int &order) |
void | GenerateLogScaleTickMarks (int order, double min=1.0, double max=9.0, bool detailLabels=true) |
![]() | |
vtkContextItem () | |
~vtkContextItem () | |
![]() | |
vtkAbstractContextItem () | |
~vtkAbstractContextItem () | |
![]() | |
vtkObject () | |
virtual | ~vtkObject () |
virtual void | RegisterInternal (vtkObjectBase *, int check) |
virtual void | UnRegisterInternal (vtkObjectBase *, int check) |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &os) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
takes care of drawing 2D axes
The vtkAxis is drawn in screen coordinates. It is usually one of the last elements of a chart to be drawn. It renders the axis label, tick marks and tick labels.
typedef vtkContextItem vtkAxis::Superclass |
anonymous enum |
anonymous enum |
anonymous enum |
|
protected |
|
protected |
|
virtual |
Reimplemented from vtkContextItem.
|
static |
|
virtual |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkContextItem.
|
virtual |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkContextItem.
|
static |
Creates a 2D Chart object.
|
virtual |
Get/set the position of the axis (LEFT, BOTTOM, RIGHT, TOP, PARALLEL).
|
virtual |
Get/set the position of the axis (LEFT, BOTTOM, RIGHT, TOP, PARALLEL).
void vtkAxis::SetPoint1 | ( | const vtkVector2f & | pos | ) |
Set point 1 of the axis (in pixels), this is usually the origin.
void vtkAxis::SetPoint1 | ( | float | x, |
float | y | ||
) |
Set point 1 of the axis (in pixels), this is usually the origin.
|
virtual |
Get point 1 of the axis (in pixels), this is usually the origin.
|
virtual |
Get point 1 of the axis (in pixels), this is usually the origin.
|
virtual |
Get point 1 of the axis (in pixels), this is usually the origin.
vtkVector2f vtkAxis::GetPosition1 | ( | ) |
Get point 1 of the axis (in pixels), this is usually the origin.
void vtkAxis::SetPoint2 | ( | const vtkVector2f & | pos | ) |
Set point 2 of the axis (in pixels), this is usually the terminus.
void vtkAxis::SetPoint2 | ( | float | x, |
float | y | ||
) |
Set point 2 of the axis (in pixels), this is usually the terminus.
|
virtual |
Get point 2 of the axis (in pixels), this is usually the terminus.
|
virtual |
Get point 2 of the axis (in pixels), this is usually the terminus.
|
virtual |
Get point 2 of the axis (in pixels), this is usually the terminus.
vtkVector2f vtkAxis::GetPosition2 | ( | ) |
Get point 2 of the axis (in pixels), this is usually the terminus.
|
virtual |
Set the number of tick marks for this axis. Default is -1, which leads to automatic calculation of nicely spaced tick marks.
|
virtual |
Get the number of tick marks for this axis.
|
virtual |
Get the vtkTextProperty that governs how the axis lables are displayed. Note that the alignment properties are not used.
|
virtual |
Set the logical minimum value of the axis, in plot coordinates.
|
virtual |
Get the logical minimum value of the axis, in plot coordinates.
|
virtual |
Set the logical maximum value of the axis, in plot coordinates.
|
virtual |
Get the logical maximum value of the axis, in plot coordinates.
|
virtual |
Get the logical range of the axis, in plot coordinates.
|
virtual |
Set the logical lowest possible value for Minimum, in plot coordinates.
|
virtual |
Get the logical lowest possible value for Minimum, in plot coordinates.
|
virtual |
Set the logical highest possible value for Maximum, in plot coordinates.
|
virtual |
Get the logical highest possible value for Maximum, in plot coordinates.
|
virtual |
Get/set the title text of the axis.
|
virtual |
Get/set the title text of the axis.
|
virtual |
Get the vtkTextProperty that governs how the axis title is displayed.
|
virtual |
Get/set whether the axis should use a log scale, default is false.
|
virtual |
Get/set whether the axis should use a log scale, default is false.
|
virtual |
Get/set whether the axis grid lines should be drawn, default is true.
|
virtual |
Get/set whether the axis grid lines should be drawn, default is true.
|
virtual |
Get/set whether the axis labels should be visible.
|
virtual |
Get/set whether the axis labels should be visible.
|
virtual |
Get/set the numerical precision to use, default is 2.
|
virtual |
Get/set the numerical precision to use, default is 2.
|
virtual |
Get/set the numerical notation, standard, scientific or mixed (0, 1, 2).
|
virtual |
Get/set the numerical notation, standard, scientific or mixed (0, 1, 2).
|
virtual |
Get/set the behavior of the axis (auto, fixed, custom). Default is 0 (auto).
|
virtual |
Get/set the behavior of the axis (auto, fixed, custom). Default is 0 (auto).
|
virtual |
Get a pointer to the vtkPen object that controls the way this axis is drawn.
|
virtual |
Get a pointer to the vtkPen object that controls the way this axis is drawn.
|
virtual |
Update the geometry of the axis. Takes care of setting up the tick mark locations etc. Should be called by the scene before rendering.
Reimplemented from vtkAbstractContextItem.
|
virtual |
Paint event for the axis, called whenever the axis needs to be drawn.
Reimplemented from vtkAbstractContextItem.
|
virtual |
Use this function to autoscale the axes after setting the minimum and maximum values. This will cause the axes to select the nicest numbers that enclose the minimum and maximum values, and to select an appropriate number of tick marks.
|
virtual |
Recalculate the spacing of the tick marks - typically useful to do after scaling the axis.
|
virtual |
An array with the positions of the tick marks along the axis line. The positions are specified in the plot coordinates of the axis.
|
virtual |
Set the tick positions (in plot coordinates).
|
virtual |
An array with the positions of the tick marks along the axis line. The positions are specified in scene coordinates.
|
virtual |
A string array containing the tick labels for the axis.
|
virtual |
Set the tick labels for the axis.
vtkRectf vtkAxis::GetBoundingRect | ( | vtkContext2D * | painter | ) |
|
protected |
Calculate and assign nice labels/logical label positions.
|
protected |
Generate tick labels from the supplied double array of tick positions.
|
protected |
Calculate the next "nicest" numbers above and below the current minimum.
|
protected |
Return a "nice number", often defined as 1, 2 or 5. If roundUp is true then the nice number will be rounded up, false it is rounded down. The supplied number should be between 0.0 and 9.9.
|
protected |
Return a tick mark for a logarithmic axis. If roundUp is true then the upper tick mark is returned. Otherwise the lower tick mark is returned. Tick marks will be: ... 0.1 0.2 .. 0.9 1 2 .. 9 10 20 .. 90 100 ... Parameter nicevalue will be set to true if tick mark is in: ... 0.1 0.2 0.5 1 2 5 10 20 50 100 ... Parameter order is set to the detected order of magnitude of the number.
|
protected |
Generate tick marks for logarithmic scale for specific order of magnitude. Mark generation is limited by parameters min and max. Tick marks will be: ... 0.1 0.2 .. 0.9 1 2 .. 9 10 20 .. 90 100 ... Tick labels will be: ... 0.1 0.2 0.5 1 2 5 10 20 50 100 ... If Parameter detaillabels is disabled tick labels will be: ... 0.1 1 10 100 ... If min/max is not in between 1.0 and 9.0 defaults will be used. If min and max do not differ 1 defaults will be used.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |