Commit 0cef6bdd authored by Julien Finet's avatar Julien Finet
Browse files

vtkTextActor3D bounds are not padded to power of two

By default, vtkTextActor3D::GetBounds() should return the displayable
bounds instead of the bounds padded to power of two.
This is important for vtkProp3DAxisFollower to correctly center
vtkTextActor3D.

Change-Id: Ibccf15c9e0df9d04eb2144ba7cfc362827d85df7
parent d086e754
......@@ -264,11 +264,15 @@ int vtkTextActor3D::UpdateImageActor()
return 0;
}
int bbox[4];
this->GetBoundingBox(bbox);
// Associate the image data (should be up to date now) to the image actor
if (this->ImageActor)
{
this->ImageActor->SetInputData(this->ImageData);
this->ImageActor->SetDisplayExtent(this->ImageData->GetExtent());
this->ImageActor->SetDisplayExtent(
bbox[0], bbox[1], bbox[2], bbox[3], 0, 0);
}
} // if (this->GetMTime() ...
......
......@@ -64,7 +64,6 @@ public:
// Description:
// Get the bounds for this Prop3D as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
// These are the padded-to-power-of-two texture bounds.
virtual double *GetBounds();
void GetBounds(double bounds[6]) {this->vtkProp3D::GetBounds( bounds );}
......
8fc41efa7f949017f06e840ed25de90f
81c1f7e7b43cfae5378cd97f2e2310a4
0433cb995fcc1280276264412f0ad525
cabec47663c0ba7564cb7a6cfbd2bed9
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