Go to the documentation of this file.
40 #ifndef vtkContextArea_h
41 #define vtkContextArea_h
46 #include "vtkChartsCoreModule.h"
94 vtkGetMacro(DrawAreaBounds,
vtkRectd)
95 vtkSetMacro(DrawAreaBounds,
vtkRectd)
119 vtkGetMacro(DrawAreaResizeBehavior, DrawAreaResizeBehaviorType)
120 vtkSetMacro(DrawAreaResizeBehavior, DrawAreaResizeBehaviorType)
130 vtkGetMacro(FixedAspect,
float)
131 virtual void SetFixedAspect(
float aspect);
142 virtual void SetFixedRect(
vtkRecti rect);
143 virtual void SetFixedRect(
int x,
int y,
int width,
int height);
155 virtual void GetFixedMarginsArray(
int margins[4]);
156 virtual const int* GetFixedMarginsArray();
157 virtual void SetFixedMargins(Margins margins);
158 virtual void SetFixedMargins(
int margins[4]);
159 virtual void SetFixedMargins(
int left,
int right,
int bottom,
int top);
168 vtkGetMacro(FillViewport,
bool)
169 vtkSetMacro(FillViewport,
bool)
170 vtkBooleanMacro(FillViewport,
bool)
177 virtual void SetShowGrid(
bool show);
178 virtual bool GetShowGrid();
194 virtual void ComputeViewTransform();
215 void UpdateDrawArea();
289 virtual void InitializeDrawArea();
302 #endif //vtkContextArea_h
float FixedAspect
The fixed aspect ratio, if DrawAreaResizeBehavior is FixedAspect.
vtkTuple< vtkAxis *, 4 > Axes
vtkAxis objects that surround the draw area, indexed by vtkAxis::Location.
bool FillViewport
If true, Geometry is set to (0, 0, vpSize[0], vpSize[1]) at the start of each Paint call.
vtkRecti DrawAreaGeometry
The rect defining the pixel location and size of the clipped and transformed area inside the axes.
virtual const Margins & GetFixedMargins()
The left, right, bottom, and top margins for the draw area, if DrawAreaResizeBehavior is FixedMargins...
base class for items that are part of a vtkContextScene.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkTuple< int, 4 > Margins
Margins FixedMargins
The left, right, bottom, and top margins for the draw area, if DrawAreaResizeBehavior is FixedMargins...
Clipped, transformed area with axes for context items.
Class for drawing 2D primitives to a graphical context.
vtkNew< vtkAxis > BottomAxis
all children of this item are clipped by the specified area.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
DrawAreaResizeBehaviorType DrawAreaResizeBehavior
Controls how the draw area size is determined.
vtkNew< vtkAxis > TopAxis
vtkRecti Geometry
The rect defining the pixel location and size of the entire vtkContextArea, including axis label,...
takes care of drawing the plot grid
Location
Enumeration of the axis locations in a conventional XY chart.
a simple class to control print indentation
vtkNew< vtkAxis > LeftAxis
virtual void ShowGridOn()
vtkNew< vtkContextTransform > Transform
The context item that clips rendered data.
vtkNew< vtkAxis > RightAxis
DrawAreaResizeBehaviorType
all children of this item are transformed by the vtkTransform2D of this item.
vtkRectd DrawAreaBounds
The data bounds of the clipped and transformed area inside of the axes.
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
takes care of drawing 2D axes
vtkNew< vtkPlotGrid > Grid
The vtkPlotGrid that renders a grid atop the data in the draw area.
virtual void ShowGridOff()
vtkRecti FixedRect
The fixed rect to use for the draw area, if DrawAreaResizeBehavior is FixedRect.
vtkNew< vtkContextClip > Clip
The context item that clips rendered data.