Commit 861343ab authored by Mathieu Westphal's avatar Mathieu Westphal

Fix bug with the screenshot of the parallel chart view

1. Fix the "mosaic" bug, due to transform be rewriten
2. Fix a bug concerning the mtime of the scene
3. Adaptating tick size to the scene scaling
4. Updating baseline
parent 54814912
abdf30e792cd5edf076ea2b8e3de8885
b1c73accbfc10292586f0f2963384b80
......@@ -377,10 +377,25 @@ bool vtkAxis::Paint(vtkContext2D *painter)
labelOffset *= -1.0;
}
vtkVector2i tileScale(1);
if (!this->Scene)
{
vtkWarningMacro("vtkAxis needs a vtkContextScene to determine window "
"properties. Assuming no tile scaling is set.");
}
else
{
tileScale = this->Scene->GetLogicalTileScale();
}
// Horizontal or vertical axis.
if (this->Position == vtkAxis::LEFT || this->Position == vtkAxis::PARALLEL ||
this->Position == vtkAxis::RIGHT)
{
// Adptating tickLength and labelOffset to the tiling of the scene
tickLength *= tileScale.GetX();
labelOffset *= tileScale.GetX();
// Draw the tick marks and labels
for (vtkIdType i = 0; i < numMarks; ++i)
{
......@@ -403,6 +418,11 @@ bool vtkAxis::Paint(vtkContext2D *painter)
}
else if (this->Position == vtkAxis::TOP || this->Position == vtkAxis::BOTTOM)
{
// Adptating tickLength and labelOffset to the tiling of the scene
tickLength *= tileScale.GetY();
labelOffset *= tileScale.GetY();
// Draw the tick marks and labels
for (vtkIdType i = 0; i < numMarks; ++i)
{
......
......@@ -104,10 +104,11 @@ void vtkChartParallelCoordinates::Update()
return;
}
if (table->GetMTime() < this->BuildTime && this->MTime < this->BuildTime)
{
if (table->GetMTime() < this->BuildTime && this->MTime < this->BuildTime &&
this->GetScene()->GetMTime() < this->BuildTime)
{
return;
}
}
// Now we have a table, set up the axes accordingly, clear and build.
if (static_cast<int>(this->Storage->Axes.size()) !=
......@@ -190,7 +191,7 @@ bool vtkChartParallelCoordinates::Paint(vtkContext2D *painter)
}
painter->PushMatrix();
painter->SetTransform(this->Storage->Transform);
painter->AppendTransform(this->Storage->Transform);
this->Storage->Plot->Paint(painter);
painter->PopMatrix();
......
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