45 #include "vtkChartsCoreModule.h"
54 VTK_ABI_NAMESPACE_BEGIN
83 TICK_WILKINSON_EXTENDED
95 virtual void SetPosition(
int position);
104 void SetPoint1(
float x,
float y);
111 vtkGetVector2Macro(Point1,
float);
120 void SetPoint2(
float x,
float y);
127 vtkGetVector2Macro(Point2,
float);
135 virtual void SetNumberOfTicks(
int numberOfTicks);
141 vtkGetMacro(NumberOfTicks,
int);
148 vtkSetMacro(TickLength,
float);
149 vtkGetMacro(TickLength,
float);
165 virtual void SetMinimum(
double minimum);
173 vtkGetMacro(Minimum,
double);
181 virtual void SetMaximum(
double maximum);
189 vtkGetMacro(Maximum,
double);
197 virtual void SetUnscaledMinimum(
double minimum);
203 vtkGetMacro(UnscaledMinimum,
double);
209 virtual void SetUnscaledMaximum(
double maximum);
215 vtkGetMacro(UnscaledMaximum,
double);
228 virtual void SetRange(
double minimum,
double maximum);
229 virtual void SetRange(
double range[2]);
230 virtual void SetUnscaledRange(
double minimum,
double maximum);
231 virtual void SetUnscaledRange(
double range[2]);
242 virtual void GetRange(
double*
range);
243 virtual void GetUnscaledRange(
double*
range);
249 virtual void SetMinimumLimit(
double lowest);
255 vtkGetMacro(MinimumLimit,
double);
261 virtual void SetMaximumLimit(
double highest);
267 vtkGetMacro(MaximumLimit,
double);
273 virtual void SetUnscaledMinimumLimit(
double lowest);
279 vtkGetMacro(UnscaledMinimumLimit,
double);
285 virtual void SetUnscaledMaximumLimit(
double highest);
291 vtkGetMacro(UnscaledMaximumLimit,
double);
298 vtkGetVector2Macro(Margins,
int);
305 vtkSetVector2Macro(Margins,
int);
336 vtkGetMacro(LogScaleActive,
bool);
346 vtkGetMacro(LogScale,
bool);
347 virtual void SetLogScale(
bool logScale);
348 vtkBooleanMacro(LogScale,
bool);
355 vtkSetMacro(GridVisible,
bool);
356 vtkGetMacro(GridVisible,
bool);
363 vtkSetMacro(LabelsVisible,
bool);
364 vtkGetMacro(LabelsVisible,
bool);
371 vtkSetMacro(RangeLabelsVisible,
bool);
372 vtkGetMacro(RangeLabelsVisible,
bool);
379 virtual void SetVerticalLabels(
bool verticalLabels);
380 vtkGetMacro(VerticalLabels,
bool);
387 vtkSetMacro(LabelOffset,
float);
388 vtkGetMacro(LabelOffset,
float);
395 vtkSetMacro(OverlappingLabels,
bool);
396 vtkGetMacro(OverlappingLabels,
bool);
403 vtkSetMacro(TicksVisible,
bool);
404 vtkGetMacro(TicksVisible,
bool);
411 vtkSetMacro(AxisVisible,
bool);
412 vtkGetMacro(AxisVisible,
bool);
419 vtkSetMacro(TitleVisible,
bool);
420 vtkGetMacro(TitleVisible,
bool);
428 virtual void SetPrecision(
int precision);
429 vtkGetMacro(Precision,
int);
437 STANDARD_NOTATION = 0,
449 virtual void SetLabelFormat(
const std::string& format);
469 virtual void SetNotation(
int notation);
470 vtkGetMacro(Notation,
int);
487 vtkSetMacro(Behavior,
int);
488 vtkGetMacro(Behavior,
int);
495 vtkSetSmartPointerMacro(Pen,
vtkPen);
496 vtkGetObjectMacro(Pen,
vtkPen);
503 vtkSetSmartPointerMacro(GridPen,
vtkPen);
504 vtkGetObjectMacro(GridPen,
vtkPen);
515 vtkSetMacro(TickLabelAlgorithm,
int);
516 vtkGetMacro(TickLabelAlgorithm,
int);
524 vtkSetMacro(ScalingFactor,
double);
525 vtkGetMacro(ScalingFactor,
double);
526 vtkSetMacro(Shift,
double);
527 vtkGetMacro(Shift,
double);
547 virtual void AutoScale();
553 virtual void RecalculateTickSpacing();
594 static double NiceNumber(
double number,
bool roundUp);
600 static double NiceMinMax(
double& min,
double&
max,
float pixelRange,
float tickPixelSpacing);
625 void UpdateLogScaleActive(
bool updateMinMaxFromUnscaled);
630 virtual void GenerateTickLabels(
double min,
double max);
635 virtual void GenerateTickLabels();
637 virtual void GenerateLabelFormat(
int notation,
double n);
653 double CalculateNiceMinMax(
double& min,
double&
max);
664 double LogScaleTickMark(
double number,
bool roundUp,
bool& niceValue,
int&
order);
677 virtual void GenerateLogSpacedLinearTicks(
int order,
double min,
double max);
689 void GenerateLogScaleTickMarks(
690 int order,
double min = 1.0,
double max = 9.0,
bool detailLabels =
true);
806 void operator=(
const vtkAxis&) =
delete;
811 bool InRange(
double value);
816 void UpdateOrientation();
819 VTK_ABI_NAMESPACE_END
vtkTextProperty * LabelProperties
Location
Enumeration of the axis locations in a conventional XY chart.
Wrapper around std::string to keep symbols short.
double NonLogUnscaledMinLimit
base class for items that are part of a vtkContextScene.
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
struct Position_t Position
std::string RangeLabelFormat
double Shift
Scaling factor used on this axis, this is used to accurately render very small/large numbers accurate...
record modification and/or execution time
dynamic, self-adjusting array of float
a vtkAbstractArray subclass for strings
int TickLabelAlgorithm
The algorithm being used to tick label placement.
dynamic, self-adjusting array of double
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
double UnscaledMinimumLimit
Notations
Enumeration of the axis notations available.
double UnscaledMaximumLimit
bool Resized
Flag to indicate that the axis has been resized.
Class for drawing 2D primitives to a graphical context.
takes care of drawing 2D axes
data structure to represent mouse events.
a simple class to control print indentation
vtkSmartPointer< vtkStringArray > TickLabels
The labels for the tick marks.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
represent text properties.
double ScalingFactor
Scaling factor used on this axis, this is used to accurately render very small/large numbers accurate...
vtkSmartPointer< vtkPen > GridPen
This object stores the vtkPen that controls how the grid lines are drawn.
vtkTextProperty * TitleProperties
bool CustomTickLabels
Are we using custom tick labels, or should the axis generate them?
vtkSmartPointer< vtkDoubleArray > TickPositions
Position of tick marks in screen coordinates.
virtual bool Hit(const vtkContextMouseEvent &mouse)
Return true if the supplied x, y coordinate is inside the item.
bool UsingNiceMinMax
Hint as to whether a nice min/max was set, otherwise labels may not be present at the top/bottom of t...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
double NonLogUnscaledMaxLimit
virtual void Update()
Perform any updates to the item that may be necessary before rendering.
vtkSmartPointer< vtkPen > Pen
This object stores the vtkPen that controls how the axis is drawn.
vtkSmartPointer< vtkFloatArray > TickScenePositions
Position of tick marks in screen coordinates.
bool TickMarksDirty
Mark the tick labels as dirty when the min/max value is changed.