86#ifndef vtkAxisActor2D_h
87#define vtkAxisActor2D_h
90#include "vtkRenderingAnnotationModule.h"
96VTK_ABI_NAMESPACE_BEGIN
146 vtkGetVectorMacro(
Range,
double, 2);
175 "VTK_MAX_LABELS has been removed. Labels are now dynamically allocated. Do not use.") = 25
234 vtkSetMacro(SnapLabelsToGrid,
bool);
235 vtkGetMacro(SnapLabelsToGrid,
bool);
236 vtkBooleanMacro(SnapLabelsToGrid,
bool);
266 vtkSetMacro(SkipFirstTick,
bool);
267 vtkGetMacro(SkipFirstTick,
bool);
268 vtkBooleanMacro(SkipFirstTick,
bool);
434 return this->LabelMappers;
480 double inRange[2],
double outRange[2],
int inNumTicks,
int& outNumTicks,
double& interval);
491 int nbOfMappers,
int* targetSize,
double factor,
int* stringSize);
576 void ShiftPosition(
double start[3],
double textAngle,
int stringWidth,
int stringHeight,
577 int offset,
int finalPos[2]);
598 bool PositionsChangedOrViewportResized(
vtkViewport* viewport);
612 void UpdateTicksValueAndPosition(
vtkViewport* viewport);
637 void UpdateCachedInformations(
vtkViewport* viewport);
642 double GetViewportRulerDistance(
vtkViewport* viewport);
647 double GetViewportAxisLength(
vtkViewport* viewport);
653 void SetTitleFontSize(
vtkViewport* viewport,
int box[2]);
656 std::vector<double> NormalizedTickPositions;
657 std::vector<double> TickValues;
659 bool SnapLabelsToGrid =
false;
661 bool SkipFirstTick =
false;
663 std::vector<vtkSmartPointer<vtkTextMapper>> LabelMappers;
664 std::vector<vtkSmartPointer<vtkActor2D>> LabelActors;
virtual vtkCoordinate * GetPositionCoordinate()
Get the PositionCoordinate instance of vtkCoordinate.
virtual void SetPosition2(float x[2])
Access the Position2 instance variable.
virtual void SetPosition(float x[2])
Get the PositionCoordinate instance of vtkCoordinate.
virtual vtkCoordinate * GetPosition2Coordinate()
Access the Position2 instance variable.
virtual float * GetPosition2()
Access the Position2 instance variable.
virtual float * GetPosition()
Get the PositionCoordinate instance of vtkCoordinate.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the axis.
virtual void SetPoint1(double x[2])
Specify the position of the first point defining the axis.
virtual double * GetAdjustedRange()
Get the axis range adjusted for nice tick values.
static void SetOffsetPosition(double xTick[3], double theta, int stringWidth, int stringHeight, int offset, vtkActor2D *textActor)
Set the actor position according to the given parameters.
vtkNew< vtkPoints > TicksStartPos
vtkTextMapper * TitleMapper
vtkNew< vtkPolyDataMapper2D > AxisMapper
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
virtual std::vector< vtkSmartPointer< vtkTextMapper > > GetLabelMappers()
Get the label mappers.
vtkTypeBool TickVisibility
virtual void SetTitleTextProperty(vtkTextProperty *)
Set/Get the title text property.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual vtkTextProperty * GetLabelTextProperty()
Set/Get the labels text property.
vtkNew< vtkActor2D > AxisActor
vtkNew< vtkPolyData > Axis
vtkTypeBool LabelVisibility
int AdjustedNumberOfLabels
virtual void BuildAxis(vtkViewport *viewport)
static int SetMultipleFontSize(vtkViewport *viewport, vtkTextMapper **textMappers, int nbOfMappers, int *targetSize, double factor, int *stringSize)
General method to computes font size from a representative size on the viewport (given by size[2]).
virtual void SetPoint1(double x, double y)
Specify the position of the first point defining the axis.
int UpdateGeometryAndRenderOpaqueGeometry(vtkViewport *viewport, bool render)
Rebuild the geometry using the provided viewport, and trigger opaque geometry render only if render p...
static void ComputeRange(double inRange[2], double outRange[2], int inNumTicks, int &outNumTicks, double &interval)
This method computes the range of the axis given an input range.
void ShiftPosition(double start[3], double textAngle, int stringWidth, int stringHeight, int offset, int finalPos[2])
Get the shifted position.
virtual vtkCoordinate * GetPoint2Coordinate()
Specify the position of the second point defining the axis.
virtual vtkCoordinate * GetPoint1Coordinate()
Specify the position of the first point defining the axis.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Draw the axis.
vtkTimeStamp AdjustedRangeBuildTime
virtual void GetAdjustedRange(double _arg[2])
Get the axis range adjusted for nice tick values.
vtkPoints * GetTickPositions()
Return the positions of ticks along the axis.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
static vtkAxisActor2D * New()
Instantiate object.
vtkTypeBool UseFontSizeFromProperty
vtkTypeBool AxisVisibility
static double ComputeStringOffset(double width, double height, double theta)
int RenderOverlay(vtkViewport *viewport) override
Draw the axis.
int SizeFontRelativeToAxis
virtual double * GetPoint1()
Specify the position of the first point defining the axis.
void SetLabelFormat(const char *format)
Set/Get the std::format style format with which to print the labels on the scalar bar.
void ShallowCopy(vtkProp *prop) override
Shallow copy of an axis actor.
virtual void SetPoint2(double x[2])
Specify the position of the second point defining the axis.
virtual double * GetPoint2()
Specify the position of the second point defining the axis.
virtual int GetAdjustedNumberOfLabels()
Get the number of labels.
virtual void GetAdjustedRange(double &_arg1, double &_arg2)
Get the axis range adjusted for nice tick values.
~vtkAxisActor2D() override
virtual void SetPoint2(double x, double y)
Specify the position of the second point defining the axis.
virtual void SetLabelTextProperty(vtkTextProperty *)
Set/Get the labels text property.
vtkTypeBool TitleVisibility
virtual vtkTextProperty * GetTitleTextProperty()
Set/Get the title text property.
virtual void UpdateAdjustedRange()
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Allocate and hold a VTK object.
represent and manipulate 3D points
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Hold a reference to a vtkObjectBase instance.
represent text properties.
record modification and/or execution time
abstract specification for Viewports
window superclass for vtkRenderWindow
#define VTK_DEPRECATED_IN_9_6_0(reason)