Commit b3e29a4e authored by Kyle Lutz's avatar Kyle Lutz Committed by Code Review
Browse files

Merge topic 'vector-features' into master

c4933daa BUG: Caught a few uninitialized vectors in charts.
parents 8afeb0df c4933daa
/*=========================================================================
Program: Visualization Toolkit
......@@ -44,8 +43,8 @@ vtkAxis::vtkAxis()
this->Position = -1;
this->Point1 = this->Position1.GetData();
this->Point2 = this->Position2.GetData();
this->Position1.SetY(10.0);
this->Position2.SetY(10.0);
this->Position1.Set(0.0, 10.0);
this->Position2.Set(0.0, 10.0);
this->TickInterval = 1.0;
this->NumberOfTicks = -1;
this->LabelProperties = vtkTextProperty::New();
......
......@@ -38,7 +38,7 @@
class vtkChartLegend::Private
{
public:
Private()
Private() : Point(0, 0)
{
}
~Private()
......
......@@ -257,7 +257,7 @@ bool vtkChartXY::Paint(vtkContext2D *painter)
return false;
}
vtkVector2i geometry;
vtkVector2i geometry(0, 0);
bool recalculateTransform = false;
if (this->LayoutStrategy == vtkChart::FILL_SCENE)
{
......@@ -801,7 +801,7 @@ int vtkChartXY::GetLegendBorder(vtkContext2D* painter, int axisPosition)
}
int padding = 10;
vtkVector2i legendSize;
vtkVector2i legendSize(0, 0);
vtkVector2i legendAlignment(this->Legend->GetHorizontalAlignment(),
this->Legend->GetVerticalAlignment());
this->Legend->Update();
......@@ -846,7 +846,7 @@ int vtkChartXY::GetLegendBorder(vtkContext2D* painter, int axisPosition)
void vtkChartXY::SetLegendPosition(const vtkRectf& rect)
{
// Put the legend in the top corner of the chart
vtkVector2f pos;
vtkVector2f pos(0, 0);
int padding = 5;
vtkVector2i legendAlignment(this->Legend->GetHorizontalAlignment(),
this->Legend->GetVerticalAlignment());
......
......@@ -741,7 +741,7 @@ vtkVector2f vtkContext2D::CalculateTextPosition(vtkPoints2D* rect)
return vtkVector2f();
}
vtkVector2f p;
vtkVector2f p(0, 0);
float *f = vtkFloatArray::SafeDownCast(rect->GetData())->GetPointer(0);
if (this->Device->GetTextProp()->GetJustification() == VTK_TEXT_LEFT)
......
......@@ -73,7 +73,7 @@ vtkVector2i vtkFreeTypeStringToImage::GetBounds(vtkTextProperty *property,
vtkVector2i vtkFreeTypeStringToImage::GetBounds(vtkTextProperty *property,
const vtkStdString& string)
{
vtkVector2i recti;
vtkVector2i recti(0, 0);
int tmp[4];
if (!property || string.empty())
{
......
......@@ -88,7 +88,7 @@ vtkQtStringToImage::~vtkQtStringToImage()
vtkVector2i vtkQtStringToImage::GetBounds(vtkTextProperty *property,
const vtkUnicodeString& string)
{
vtkVector2i recti;
vtkVector2i recti(0, 0);
if (!QApplication::instance())
{
vtkErrorMacro("You must initialize a QApplication before using this class.");
......@@ -119,7 +119,7 @@ vtkVector2i vtkQtStringToImage::GetBounds(vtkTextProperty *property,
vtkVector2i vtkQtStringToImage::GetBounds(vtkTextProperty *property,
const vtkStdString& string)
{
vtkVector2i recti;
vtkVector2i recti(0, 0);
if (!QApplication::instance())
{
vtkErrorMacro("You must initialize a QApplication before using this class.");
......
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