45 #include "vtkChartsCoreModule.h"
53 VTK_ABI_NAMESPACE_BEGIN
82 TICK_WILKINSON_EXTENDED
94 virtual void SetPosition(
int position);
103 void SetPoint1(
float x,
float y);
110 vtkGetVector2Macro(Point1,
float);
119 void SetPoint2(
float x,
float y);
126 vtkGetVector2Macro(Point2,
float);
134 virtual void SetNumberOfTicks(
int numberOfTicks);
140 vtkGetMacro(NumberOfTicks,
int);
147 vtkSetMacro(TickLength,
float);
148 vtkGetMacro(TickLength,
float);
164 virtual void SetMinimum(
double minimum);
172 vtkGetMacro(Minimum,
double);
180 virtual void SetMaximum(
double maximum);
188 vtkGetMacro(Maximum,
double);
196 virtual void SetUnscaledMinimum(
double minimum);
202 vtkGetMacro(UnscaledMinimum,
double);
208 virtual void SetUnscaledMaximum(
double maximum);
214 vtkGetMacro(UnscaledMaximum,
double);
227 virtual void SetRange(
double minimum,
double maximum);
228 virtual void SetRange(
double range[2]);
229 virtual void SetUnscaledRange(
double minimum,
double maximum);
230 virtual void SetUnscaledRange(
double range[2]);
241 virtual void GetRange(
double*
range);
242 virtual void GetUnscaledRange(
double*
range);
248 virtual void SetMinimumLimit(
double lowest);
254 vtkGetMacro(MinimumLimit,
double);
260 virtual void SetMaximumLimit(
double highest);
266 vtkGetMacro(MaximumLimit,
double);
272 virtual void SetUnscaledMinimumLimit(
double lowest);
278 vtkGetMacro(UnscaledMinimumLimit,
double);
284 virtual void SetUnscaledMaximumLimit(
double highest);
290 vtkGetMacro(UnscaledMaximumLimit,
double);
297 vtkGetVector2Macro(Margins,
int);
304 vtkSetVector2Macro(Margins,
int);
335 vtkGetMacro(LogScaleActive,
bool);
345 vtkGetMacro(LogScale,
bool);
346 virtual void SetLogScale(
bool logScale);
347 vtkBooleanMacro(LogScale,
bool);
354 vtkSetMacro(GridVisible,
bool);
355 vtkGetMacro(GridVisible,
bool);
362 vtkSetMacro(LabelsVisible,
bool);
363 vtkGetMacro(LabelsVisible,
bool);
370 vtkSetMacro(RangeLabelsVisible,
bool);
371 vtkGetMacro(RangeLabelsVisible,
bool);
378 vtkSetMacro(LabelOffset,
float);
379 vtkGetMacro(LabelOffset,
float);
386 vtkSetMacro(TicksVisible,
bool);
387 vtkGetMacro(TicksVisible,
bool);
394 vtkSetMacro(AxisVisible,
bool);
395 vtkGetMacro(AxisVisible,
bool);
402 vtkSetMacro(TitleVisible,
bool);
403 vtkGetMacro(TitleVisible,
bool);
411 virtual void SetPrecision(
int precision);
412 vtkGetMacro(Precision,
int);
420 STANDARD_NOTATION = 0,
431 virtual void SetLabelFormat(
const std::string& fmt);
451 virtual void SetNotation(
int notation);
452 vtkGetMacro(Notation,
int);
469 vtkSetMacro(Behavior,
int);
470 vtkGetMacro(Behavior,
int);
477 vtkSetSmartPointerMacro(Pen,
vtkPen);
478 vtkGetObjectMacro(Pen,
vtkPen);
485 vtkSetSmartPointerMacro(GridPen,
vtkPen);
486 vtkGetObjectMacro(GridPen,
vtkPen);
497 vtkSetMacro(TickLabelAlgorithm,
int);
498 vtkGetMacro(TickLabelAlgorithm,
int);
506 vtkSetMacro(ScalingFactor,
double);
507 vtkGetMacro(ScalingFactor,
double);
508 vtkSetMacro(Shift,
double);
509 vtkGetMacro(Shift,
double);
529 virtual void AutoScale();
535 virtual void RecalculateTickSpacing();
576 static double NiceNumber(
double number,
bool roundUp);
582 static double NiceMinMax(
double& min,
double&
max,
float pixelRange,
float tickPixelSpacing);
607 void UpdateLogScaleActive(
bool updateMinMaxFromUnscaled);
612 virtual void GenerateTickLabels(
double min,
double max);
617 virtual void GenerateTickLabels();
619 virtual void GenerateLabelFormat(
int notation,
double n);
630 double CalculateNiceMinMax(
double& min,
double&
max);
641 double LogScaleTickMark(
double number,
bool roundUp,
bool& niceValue,
int&
order);
654 virtual void GenerateLogSpacedLinearTicks(
int order,
double min,
double max);
666 void GenerateLogScaleTickMarks(
667 int order,
double min = 1.0,
double max = 9.0,
bool detailLabels =
true);
781 void operator=(
const vtkAxis&) =
delete;
786 bool InRange(
double value);
789 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
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.