 |
VTK
9.0.1
|
Go to the documentation of this file.
40 #ifndef vtkContextArea_h
41 #define vtkContextArea_h
46 #include "vtkChartsCoreModule.h"
168 vtkGetMacro(FillViewport,
bool);
169 vtkSetMacro(FillViewport,
bool);
170 vtkBooleanMacro(FillViewport,
bool);
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.
virtual void InitializeDrawArea()
Initialize the drawing area's item hierarchy.
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...
virtual void SetFixedMargins(Margins margins)
static vtkContextArea * New()
base class for items that are part of a vtkContextScene.
vtkRecti ComputeFixedAspectDrawAreaGeometry(vtkContext2D *painter)
vtkRecti ComputeExpandedDrawAreaGeometry(vtkContext2D *painter)
Working implementations for ComputeDrawAreaGeometry.
virtual bool GetShowGrid()
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.
vtkAxis * GetAxis(vtkAxis::Location location)
Get the vtkAxis associated with the specified location.
Class for drawing 2D primitives to a graphical context.
vtkNew< vtkAxis > BottomAxis
all children of this item are clipped by the specified area.
bool Paint(vtkContext2D *painter) override
Paint event for the item, called whenever the item needs to be drawn.
virtual const int * GetFixedMarginsArray()
DrawAreaResizeBehaviorType DrawAreaResizeBehavior
Controls how the draw area size is determined.
vtkNew< vtkAxis > TopAxis
virtual void SetFixedMargins(int left, int right, int bottom, int top)
vtkRecti Geometry
The rect defining the pixel location and size of the entire vtkContextArea, including axis label,...
takes care of drawing the plot grid
~vtkContextArea() override
Location
Enumeration of the axis locations in a conventional XY chart.
vtkRecti ComputeFixedMarginsDrawAreaGeometry(vtkContext2D *painter)
vtkRecti ComputeDrawAreaGeometry(vtkContext2D *painter)
Return the draw area's geometry.
a simple class to control print indentation
virtual void SetAxisRange(vtkRectd const &data)
vtkNew< vtkAxis > LeftAxis
void show(std::shared_ptr< QObject > widgetOrWindow, const QSize &size)
vtkAbstractContextItem * GetDrawAreaItem()
Returns the vtkAbstractContextItem that will draw in the clipped, transformed space.
virtual void SetShowGrid(bool show)
Turn on/off grid visibility.
virtual void ShowGridOn()
vtkNew< vtkContextTransform > Transform
The context item that clips rendered data.
vtkNew< vtkAxis > RightAxis
virtual void SetFixedRect(int x, int y, int width, int height)
void UpdateDrawArea()
Set the transform to map DrawAreaBounds to DrawAreaGeometry.
virtual void ComputeViewTransform()
DrawAreaResizeBehaviorType
virtual void SetFixedMargins(int margins[4])
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 void SetFixedAspect(float aspect)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRecti ComputeFixedRectDrawAreaGeometry(vtkContext2D *painter)
virtual void SetFixedRect(vtkRecti rect)
takes care of drawing 2D axes
void LayoutAxes(vtkContext2D *painter)
Sync the Axes locations with Geometry, and update the DrawAreaGeometry to account for Axes size (marg...
vtkNew< vtkPlotGrid > Grid
The vtkPlotGrid that renders a grid atop the data in the draw area.
virtual void ShowGridOff()
virtual void GetFixedMarginsArray(int margins[4])
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.