 |
VTK
9.1.0
|
Go to the documentation of this file.
45 #ifndef vtkChartMatrix_h
46 #define vtkChartMatrix_h
49 #include "vtkChartsCoreModule.h"
102 for (
int i = 0; i < 4; i++)
104 borders[i] = this->Borders[i];
194 virtual void Link(
const size_t& flatIndex1,
const size_t& flatIndex2,
int axis = 1);
202 virtual void LinkAll(
const size_t& flatIndex,
int axis = 1);
211 virtual void Unlink(
const size_t& flatIndex1,
const size_t& flatIndex2,
int axis = 1);
219 virtual void UnlinkAll(
const size_t& flatIndex,
int axis = 1);
319 #endif // vtkChartMatrix_h
Factory class for drawing 2D charts.
void SetBorderBottom(int value)
Set/get the borders of the chart matrix (space in pixels around each chart).
virtual void ResetLinkedLayout()
Unlink every chart from all other charts for a specified axis.
std::map< vtkVector2i, vtkVector2f > SpecificResize
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
base class for items that are part of a vtkContextScene.
virtual vtkVector2i GetSize() const
Get the width and height of the chart matrix.
virtual void LinkAll(const size_t &flatIndex, int axis=1)
Link a chart to all other charts in this chart matrix for specified axis.
virtual void Link(const vtkVector2i &index1, const vtkVector2i &index2, int axis=1)
The chart at index2 will be setup to mimic axis range of chart at index1 for specified axis.
bool Paint(vtkContext2D *painter) override
Paint event for the chart matrix.
container for a matrix of charts.
abstract base class for most VTK objects
virtual void SetBorders(int left, int bottom, int right, int top)
Set/get the borders of the chart matrix (space in pixels around each chart).
virtual void SetRect(vtkRecti rect)
Set the rectangular region that this chart matrix will occupy.
Class for drawing 2D primitives to a graphical context.
virtual void UnlinkAll(const size_t &flatIndex, int axis=1)
Unlink all charts from given chart for a specified axis.
virtual std::size_t GetNumberOfCharts()
Total number of charts within this chart matrix.
virtual bool SetChartMatrix(const vtkVector2i &position, vtkChartMatrix *chartMatrix)
Set the element at position to a chart matrix, note that the chart matrix must be large enough to acc...
virtual std::size_t GetFlatIndex(const vtkVector2i &index)
Get internal 1-D index corresponding to the 2-D element index.
~vtkChartMatrix() override
virtual bool IsDoneWithTraversal()
These methods offer an API to iterate over the layout and obtain the offset of each child element (ch...
virtual void GoToNextElement(vtkVector2i &index, vtkVector2f &offset)
These methods offer an API to iterate over the layout and obtain the offset of each child element (ch...
virtual void SynchronizeAxisRanges(vtkObject *caller, unsigned long eventId, void *calldata)
virtual vtkVector2i GetChartIndex(const vtkVector2f &position)
Get the position of an element in the matrix at the specified location.
virtual void GetBorders(int borders[4])
Set/get the borders of the chart matrix (space in pixels around each chart).
virtual void SetSize(const vtkVector2i &size)
Set the width and height of the chart matrix.
virtual void Allocate()
Allocate the charts, this will cause any null chart to be allocated.
virtual void SetSpecificResize(const vtkVector2i &index, const vtkVector2f &resize)
Set a specific resize that will move the bottom left point of a chart.
void SetBorderRight(int value)
Set/get the borders of the chart matrix (space in pixels around each chart).
virtual void UnlinkAll(const vtkVector2i &index, int axis=1)
Unlink all charts from given chart for a specified axis.
a simple class to control print indentation
virtual void Link(const size_t &flatIndex1, const size_t &flatIndex2, int axis=1)
The chart at index2 will be setup to mimic axis range of chart at index1 for specified axis.
virtual vtkVector2i GetChartSpan(const vtkVector2i &position)
Get the span of the specified element.
virtual vtkVector2f GetGutter() const
Get the gutter that should be left between the charts in the matrix.
static vtkChartMatrix * New()
Creates a new object.
virtual bool SetChartSpan(const vtkVector2i &position, const vtkVector2i &span)
Set the span of an element in the matrix.
void SetBorderLeft(int value)
Set/get the borders of the chart matrix (space in pixels around each chart).
virtual vtkRectf ComputeCurrentElementSceneRect(const vtkVector2i &index, const vtkVector2f &offset, const vtkVector2f &increment)
Override this method if you want to customize layout instead of the default.
virtual void LinkAll(const vtkVector2i &index, int axis=1)
Link a chart to all other charts in this chart matrix for specified axis.
void Update() override
Perform any updates to the item that may be necessary before rendering.
virtual void LabelOuter(const vtkVector2i &leftBottomIdx, const vtkVector2i &rightTopIdx)
Link all charts in the rectangle from leftBottom to rightTop.
vtkSetEnumMacro(FillStrategy, StretchType)
This specifies whether the chart matrix will fill the entire scene or instead draw itself in a user p...
virtual void Unlink(const size_t &flatIndex1, const size_t &flatIndex2, int axis=1)
Unlink the two charts for specified axis i.e, Chart at index2 will no longer mimic the axis range of ...
void SetGutterX(float value)
Set the gutter that should be left between the charts in the matrix.
virtual vtkChart * GetChart(const vtkVector2i &position)
Get the specified chart element, if the element does not exist nullptr will be returned.
void SetBorderTop(int value)
Set/get the borders of the chart matrix (space in pixels around each chart).
Some derived classes for the different vectors commonly used.
void SetGutterY(float value)
Set the gutter that should be left between the charts in the matrix.
virtual void InitLayoutTraversal(vtkVector2i &index, vtkVector2f &offset, vtkVector2f &increment)
These methods offer an API to iterate over the layout and obtain the offset of each child element (ch...
virtual bool SetChart(const vtkVector2i &position, vtkChart *chart)
Set the chart element, note that the chart matrix must be large enough to accommodate the element bei...
virtual vtkChartMatrix * GetChartMatrix(const vtkVector2i &position)
Get the specified chart matrix element.
StretchType GetFillStrategy()
This specifies whether the chart matrix will fill the entire scene or instead draw itself in a user p...
virtual void SetGutter(const vtkVector2f &gutter)
Set the gutter that should be left between the charts in the matrix.
virtual void ResetLinks(int axis=1)
Unlink every chart from all other charts for a specified axis.
virtual void Unlink(const vtkVector2i &index1, const vtkVector2i &index2, int axis=1)
Unlink the two charts for specified axis i.e, Chart at index2 will no longer mimic the axis range of ...
virtual void ClearSpecificResizes()
Set a specific resize that will move the bottom left point of a chart.