Commit 5d417755 authored by Dan Lipsa's avatar Dan Lipsa

Add component-wise set functions for Border and Gutter (vtkChartMatrix)

Change-Id: Ie8d28892ba4167136a066fc2723f1b549f8145fe
parent 7debeb05
......@@ -147,12 +147,49 @@ void vtkChartMatrix::SetBorders(int left, int bottom, int right, int top)
this->LayoutIsDirty = true;
}
void vtkChartMatrix::SetBorderLeft(int value)
{
this->Borders[vtkAxis::LEFT] = value;
this->LayoutIsDirty = true;
}
void vtkChartMatrix::SetBorderBottom(int value)
{
this->Borders[vtkAxis::BOTTOM] = value;
this->LayoutIsDirty = true;
}
void vtkChartMatrix::SetBorderRight(int value)
{
this->Borders[vtkAxis::RIGHT] = value;
this->LayoutIsDirty = true;
}
void vtkChartMatrix::SetBorderTop(int value)
{
this->Borders[vtkAxis::TOP] = value;
this->LayoutIsDirty = true;
}
void vtkChartMatrix::SetGutter(const vtkVector2f &gutter)
{
this->Gutter = gutter;
this->LayoutIsDirty = true;
}
void vtkChartMatrix::SetGutterX(float value)
{
this->Gutter.SetX (value);
this->LayoutIsDirty = true;
}
void vtkChartMatrix::SetGutterY(float value)
{
this->Gutter.SetY (value);
this->LayoutIsDirty = true;
}
void vtkChartMatrix::Allocate()
{
// Force allocation of all objects as vtkChartXY.
......
......@@ -60,6 +60,10 @@ public:
// Description:
// Set/get the borders of the chart matrix (space in pixels around each chart).
virtual void SetBorders(int left, int bottom, int right, int top);
void SetBorderLeft(int value);
void SetBorderBottom(int value);
void SetBorderRight(int value);
void SetBorderTop(int value);
virtual void GetBorders(int borders[4])
{
for(int i=0;i<4;i++)
......@@ -71,6 +75,8 @@ public:
// Description:
// Set the gutter that should be left between the charts in the matrix.
virtual void SetGutter(const vtkVector2f& gutter);
void SetGutterX(float value);
void SetGutterY(float value);
// Description:
// Get the gutter that should be left between the charts in the matrix.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment