Commit 08f8c1f6 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell Committed by Kitware Robot
Browse files

Merge topic 'bar-graph-range'

08080a18 BUG: Bar plots need to account for offsets.
parents 28bd67ab 08080a18
...@@ -271,7 +271,7 @@ public: ...@@ -271,7 +271,7 @@ public:
{ {
brush->SetColor(colorSeries->GetColorRepeating(colorInSeries++).GetData()); brush->SetColor(colorSeries->GetColorRepeating(colorInSeries++).GetData());
} }
(*it)->Paint(painter,pen,brush,width,offset); (*it)->Paint(painter, pen, brush, width, offset);
} }
} }
...@@ -362,8 +362,8 @@ bool vtkPlotBar::Paint(vtkContext2D *painter) ...@@ -362,8 +362,8 @@ bool vtkPlotBar::Paint(vtkContext2D *painter)
vtkDebugMacro("No selection set."); vtkDebugMacro("No selection set.");
} }
this->Private->PaintSegments(painter,this->ColorSeries,this->Pen,this->Brush, this->Private->PaintSegments(painter,this->ColorSeries, this->Pen,this->Brush,
this->Width,this->Offset); this->Width, this->Offset);
return true; return true;
} }
...@@ -402,8 +402,8 @@ void vtkPlotBar::GetBounds(double bounds[4]) ...@@ -402,8 +402,8 @@ void vtkPlotBar::GetBounds(double bounds[4])
{ {
x->GetRange(&bounds[0]); x->GetRange(&bounds[0]);
// We surround our point by Width/2 on either side // We surround our point by Width/2 on either side
bounds[0] -= this->Width / 2; bounds[0] -= this->Width / 2.0 + this->Offset;
bounds[1] += this->Width / 2; bounds[1] += this->Width / 2.0 - this->Offset;
} }
y->GetRange(&bounds[2]); y->GetRange(&bounds[2]);
......
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