49 #ifndef vtkAxisActor2D_h
50 #define vtkAxisActor2D_h
53 #include "vtkRenderingAnnotationModule.h"
57 VTK_ABI_NAMESPACE_BEGIN
103 vtkSetVector2Macro(
Range,
double);
104 vtkGetVectorMacro(
Range,
double, 2);
124 vtkGetMacro(RulerDistance,
double);
138 vtkSetClampMacro(NumberOfLabels,
int, 2, VTK_MAX_LABELS);
139 vtkGetMacro(NumberOfLabels,
int);
147 vtkSetStringMacro(LabelFormat);
148 vtkGetStringMacro(LabelFormat);
165 this->UpdateAdjustedRange();
166 return this->AdjustedRange;
170 this->UpdateAdjustedRange();
171 _arg1 = this->AdjustedRange[0];
172 _arg2 = this->AdjustedRange[1];
177 this->UpdateAdjustedRange();
178 return this->AdjustedNumberOfLabels;
186 vtkSetStringMacro(Title);
187 vtkGetStringMacro(Title);
211 vtkSetClampMacro(TickLength,
int, 0, 100);
212 vtkGetMacro(TickLength,
int);
220 vtkSetClampMacro(NumberOfMinorTicks,
int, 0, 20);
221 vtkGetMacro(NumberOfMinorTicks,
int);
229 vtkSetClampMacro(MinorTickLength,
int, 0, 100);
230 vtkGetMacro(MinorTickLength,
int);
239 vtkSetClampMacro(TickOffset,
int, 0, 100);
240 vtkGetMacro(TickOffset,
int);
284 vtkSetMacro(TitlePosition,
double);
285 vtkGetMacro(TitlePosition,
double);
294 vtkSetClampMacro(FontFactor,
double, 0.1, 2.0);
295 vtkGetMacro(FontFactor,
double);
303 vtkSetClampMacro(LabelFactor,
double, 0.1, 2.0);
304 vtkGetMacro(LabelFactor,
double);
338 static void ComputeRange(
339 double inRange[2],
double outRange[2],
int inNumTicks,
int& outNumTicks,
double& interval);
350 int nbOfMappers,
int* targetSize,
double factor,
int* stringSize);
359 vtkBooleanMacro(SizeFontRelativeToAxis,
vtkTypeBool);
370 vtkBooleanMacro(UseFontSizeFromProperty,
vtkTypeBool);
388 double TitlePosition = 0.5;
390 double RulerDistance = 1.;
391 int NumberOfLabels = 5;
393 double FontFactor = 1.;
394 double LabelFactor = 0.75;
396 int MinorTickLength = 3;
398 int NumberOfMinorTicks = 0;
400 double AdjustedRange[2];
401 int AdjustedNumberOfLabels = 5;
402 int NumberOfLabelsBuilt = 0;
409 int LastPosition[2] = { 0, 0 };
410 int LastPosition2[2] = { 0, 0 };
412 int LastSize[2] = { 0, 0 };
413 int LastMaxLabelSize[2] = { 0, 0 };
415 int SizeFontRelativeToAxis = 0;
419 static double ComputeStringOffset(
double width,
double height,
double theta);
420 static void SetOffsetPosition(
double xTick[3],
double theta,
int stringWidth,
int stringHeight,
422 virtual void UpdateAdjustedRange();
442 VTK_ABI_NAMESPACE_END
abstract superclass for all actors, volumes and annotations
virtual void GetAdjustedRange(double _arg[2])
Set/Get the flag that controls whether the labels and ticks are adjusted for "nice" numerical values ...
virtual void SetPosition(float x[2])
Get the PositionCoordinate instance of vtkCoordinate.
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
abstract specification for Viewports
virtual double * GetPoint1()
Specify the position of the first point defining the axis.
a actor that draws 2D data
record modification and/or execution time
vtkActor2D ** LabelActors
virtual vtkCoordinate * GetPositionCoordinate()
Get the PositionCoordinate instance of vtkCoordinate.
Create an axis with tick marks and labels.
vtkTextProperty * TitleTextProperty
virtual void SetPoint1(double x, double y)
Specify the position of the first point defining the axis.
concrete dataset represents vertices, lines, polygons, and triangle strips
void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkActor2D.
virtual void SetPoint2(double x, double y)
Specify the position of the second point defining the axis.
virtual float * GetPosition2()
Access the Position2 instance variable.
virtual vtkCoordinate * GetPoint2Coordinate()
Specify the position of the second point defining the axis.
virtual void GetAdjustedRange(double &_arg1, double &_arg2)
Set/Get the flag that controls whether the labels and ticks are adjusted for "nice" numerical values ...
virtual vtkCoordinate * GetPoint1Coordinate()
Specify the position of the first point defining the axis.
window superclass for vtkRenderWindow
auto Range(IterablePtr iterable, Options &&...opts) -> typename detail::IterableTraits< typename detail::StripPointers< IterablePtr >::type >::RangeType
Generate an iterable STL proxy object for a VTK container.
virtual double * GetAdjustedRange()
Set/Get the flag that controls whether the labels and ticks are adjusted for "nice" numerical values ...
vtkTimeStamp AdjustedRangeBuildTime
virtual double * GetPoint2()
Specify the position of the second point defining the axis.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
vtkNew< vtkActor2D > AxisActor
a simple class to control print indentation
vtkTextMapper * TitleMapper
static vtkActor2D * New()
Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at la...
vtkTextMapper ** LabelMappers
virtual void SetPosition2(float x[2])
Access the Position2 instance variable.
virtual float * GetPosition()
Get the PositionCoordinate instance of vtkCoordinate.
virtual void SetPoint2(double x[2])
Specify the position of the second point defining the axis.
virtual vtkCoordinate * GetPosition2Coordinate()
Access the Position2 instance variable.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the axis.
represent text properties.
vtkTextProperty * LabelTextProperty
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
virtual void SetPoint1(double x[2])
Specify the position of the first point defining the axis.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
vtkNew< vtkPolyData > Axis
vtkNew< vtkPolyDataMapper2D > AxisMapper
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
virtual int GetAdjustedNumberOfLabels()
Set/Get the flag that controls whether the labels and ticks are adjusted for "nice" numerical values ...
draw vtkPolyData onto the image plane
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.