Commit 903a1363 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell Committed by Code Review
Browse files

Merge topic 'vector-features' into master

3be5ef73 BUG: Fixed a couple of issues with bounds.
parents b3e29a4e 3be5ef73
......@@ -657,7 +657,7 @@ vtkRectf vtkAxis::GetBoundingRect(vtkContext2D* painter)
float widest = 0.0;
// Second, calculate the tallest tick label
float tallest = 0.0;
vtkRectf bounds;
vtkRectf bounds(0, 0, 0, 0);
for(vtkIdType i = 0; i < this->TickLabels->GetNumberOfTuples(); ++i)
{
painter->ApplyTextProp(this->LabelProperties);
......@@ -670,7 +670,7 @@ vtkRectf vtkAxis::GetBoundingRect(vtkContext2D* painter)
this->MaxLabel[1] = tallest;
// Then, if there is an axis label, add that in.
vtkRectf titleBounds;
vtkRectf titleBounds(0, 0, 0, 0);
if (this->Title && !this->Title.empty())
{
painter->ApplyTextProp(this->TitleProperties);
......
......@@ -51,6 +51,7 @@ vtkChart::vtkChart()
this->Point1[1] = 0;
this->Point2[0] = 0;
this->Point2[1] = 0;
this->Size.Set(0, 0, 0, 0);
this->ShowLegend = false;
this->TitleProperties = vtkTextProperty::New();
this->TitleProperties->SetJustificationToCentered();
......
......@@ -58,6 +58,7 @@ vtkChartLegend::vtkChartLegend()
{
this->Storage = new vtkChartLegend::Private;
this->Point = this->Storage->Point.GetData();
this->Rect.Set(0, 0, 0, 0);
// Defaults to 12pt text, with top, right alignment to the specified point.
this->LabelProperties->SetFontSize(12);
this->LabelProperties->SetColor(0.0, 0.0, 0.0);
......
......@@ -254,7 +254,7 @@ bool vtkChartPie::LocatePointInPlots(const vtkContextMouseEvent &mouse)
int dimensions[4];
vtkVector2f position(mouse.GetScreenPos().Cast<float>().GetData());
vtkVector2f tolerance(5, 5);
vtkVector2f plotPos;
vtkVector2f plotPos(0, 0);
this->Private->Plot->GetDimensions(dimensions);
vtkVector2i pos(mouse.GetScreenPos());
......
Supports Markdown
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