31 #ifndef vtkContextArea_h
32 #define vtkContextArea_h
37 #include "vtkChartsCoreModule.h"
41 VTK_ABI_NAMESPACE_BEGIN
86 vtkGetMacro(DrawAreaBounds,
vtkRectd);
87 vtkSetMacro(DrawAreaBounds,
vtkRectd);
112 vtkGetMacro(DrawAreaResizeBehavior, DrawAreaResizeBehaviorType);
113 vtkSetMacro(DrawAreaResizeBehavior, DrawAreaResizeBehaviorType);
123 vtkGetMacro(FixedAspect,
float) virtual
void SetFixedAspect(
float aspect);
134 virtual
void SetFixedRect(vtkRecti rect);
135 virtual
void SetFixedRect(
int x,
int y,
int width,
int height);
146 virtual const Margins& GetFixedMargins() {
return this->FixedMargins; }
147 virtual void GetFixedMarginsArray(
int margins[4]);
148 virtual const int* GetFixedMarginsArray();
149 virtual void SetFixedMargins(Margins margins);
150 virtual void SetFixedMargins(
int margins[4]);
151 virtual void SetFixedMargins(
int left,
int right,
int bottom,
int top);
160 vtkGetMacro(FillViewport,
bool);
161 vtkSetMacro(FillViewport,
bool);
162 vtkBooleanMacro(FillViewport,
bool);
169 virtual void SetShowGrid(
bool show);
170 virtual bool GetShowGrid();
186 virtual void ComputeViewTransform();
207 void UpdateDrawArea();
281 virtual void InitializeDrawArea();
294 VTK_ABI_NAMESPACE_END
295 #endif // vtkContextArea_h
bool FillViewport
If true, Geometry is set to (0, 0, vpSize[0], vpSize[1]) at the start of each Paint call...
Location
Enumeration of the axis locations in a conventional XY chart.
vtkTuple< int, 4 > Margins
vtkNew< vtkAxis > BottomAxis
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
virtual void ShowGridOff()
Turn on/off grid visibility.
vtkRecti Geometry
The rect defining the pixel location and size of the entire vtkContextArea, including axis label...
Margins FixedMargins
The left, right, bottom, and top margins for the draw area, if DrawAreaResizeBehavior is FixedMargins...
vtkNew< vtkContextClip > Clip
The context item that clips rendered data.
all children of this item are transformed by the vtkTransform2D of this item.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRecti DrawAreaGeometry
The rect defining the pixel location and size of the clipped and transformed area inside the axes...
virtual void ShowGridOn()
Turn on/off grid visibility.
Class for drawing 2D primitives to a graphical context.
takes care of drawing 2D axes
a simple class to control print indentation
void show(std::shared_ptr< QObject > widgetOrWindow, const QSize &size)
vtkNew< vtkContextTransform > Transform
The context item that clips rendered data.
Clipped, transformed area with axes for context items.
vtkNew< vtkAxis > TopAxis
vtkNew< vtkAxis > LeftAxis
vtkRecti FixedRect
The fixed rect to use for the draw area, if DrawAreaResizeBehavior is FixedRect.
vtkNew< vtkAxis > RightAxis
float FixedAspect
The fixed aspect ratio, if DrawAreaResizeBehavior is FixedAspect.
base class for items that are part of a vtkContextScene.
takes care of drawing the plot grid
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkNew< vtkPlotGrid > Grid
The vtkPlotGrid that renders a grid atop the data in the draw area.
vtkRectd DrawAreaBounds
The data bounds of the clipped and transformed area inside of the axes.
DrawAreaResizeBehaviorType
vtkTuple< vtkAxis *, 4 > Axes
vtkAxis objects that surround the draw area, indexed by vtkAxis::Location.
all children of this item are clipped by the specified area.
DrawAreaResizeBehaviorType DrawAreaResizeBehavior
Controls how the draw area size is determined.