43#ifndef vtkContextArea_h
44#define vtkContextArea_h
49#include "vtkChartsCoreModule.h"
62 virtual
void PrintSelf(ostream &os,
vtkIndent indent);
133 vtkGetMacro(FixedAspect,
float)
134 virtual
void SetFixedAspect(
float aspect);
146 virtual
void SetFixedRect(
int x,
int y,
int width,
int height);
157 virtual const
Margins& GetFixedMargins() {
return this->FixedMargins; }
171 vtkGetMacro(FillViewport,
bool)
180 virtual
void SetShowGrid(
bool show);
181 virtual
bool GetShowGrid();
182 virtual
void ShowGridOn() { this->SetShowGrid(
true); }
base class for items that are part of a vtkContextScene.
takes care of drawing 2D axes
Class for drawing 2D primitives to a graphical context.
Clipped, transformed area with axes for context items.
vtkRecti ComputeDrawAreaGeometry(vtkContext2D *painter)
Return the draw area's geometry.
vtkRecti ComputeFixedRectDrawAreaGeometry(vtkContext2D *painter)
virtual void GetFixedMarginsArray(int margins[4])
vtkRecti ComputeExpandedDrawAreaGeometry(vtkContext2D *painter)
Working implementations for ComputeDrawAreaGeometry.
vtkRecti DrawAreaGeometry
The rect defining the pixel location and size of the clipped and transformed area inside the axes.
virtual const int * GetFixedMarginsArray()
vtkTuple< vtkAxis *, 4 > Axes
vtkAxis objects that surround the draw area, indexed by vtkAxis::Location.
virtual void ShowGridOff()
vtkNew< vtkContextClip > Clip
The context item that clips rendered data.
float FixedAspect
The fixed aspect ratio, if DrawAreaResizeBehavior is FixedAspect.
vtkTuple< int, 4 > Margins
void UpdateDrawArea()
Set the transform to map DrawAreaBounds to DrawAreaGeometry.
vtkRecti ComputeFixedMarginsDrawAreaGeometry(vtkContext2D *painter)
bool FillViewport
If true, Geometry is set to (0, 0, vpSize[0], vpSize[1]) at the start of each Paint call.
vtkRecti FixedRect
The fixed rect to use for the draw area, if DrawAreaResizeBehavior is FixedRect.
vtkRecti Geometry
The rect defining the pixel location and size of the entire vtkContextArea, including axis label,...
vtkNew< vtkContextTransform > Transform
The context item that clips rendered data.
void LayoutAxes(vtkContext2D *painter)
Sync the Axes locations with Geometry, and update the DrawAreaGeometry to account for Axes size (marg...
virtual void SetFixedMargins(Margins margins)
Margins FixedMargins
The left, right, bottom, and top margins for the draw area, if DrawAreaResizeBehavior is FixedMargins...
vtkRectd DrawAreaBounds
The data bounds of the clipped and transformed area inside of the axes.
virtual void SetFixedMargins(int margins[4])
DrawAreaResizeBehaviorType
vtkNew< vtkPlotGrid > Grid
The vtkPlotGrid that renders a grid atop the data in the draw area.
virtual void SetFixedMargins(int left, int right, int bottom, int top)
vtkRecti ComputeFixedAspectDrawAreaGeometry(vtkContext2D *painter)
DrawAreaResizeBehaviorType DrawAreaResizeBehavior
Controls how the draw area size is determined.
all children of this item are clipped by the specified area.
all children of this item are transformed by the vtkTransform2D of this item.
a simple class to control print indentation
takes care of drawing the plot grid
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.