[vtkusers] vtkTextMapper Disable Resize

Slaughter, Andrew E andrew.slaughter at inl.gov
Wed Oct 14 10:52:14 EDT 2015


The 'Modified()' call did the trick, I will go with that until the next
release. Thanks.

On Wed, Oct 14, 2015 at 8:37 AM, David Lonie <david.lonie at kitware.com>
wrote:

> Hi Andrew,
>
> I tested this on the latest master and the example is working as expected.
> I suspect that the patch below is the one that fixes the issue.
>
> If you can't patch / update the VTK you're using, it looks like a
> workaround would be to call
>
> mapper.GetTextProperty().Modified()
>
> when you update the input string, as that will trigger the coordinates to
> be recalculated.
>
> commit 1cc1ad152dec84306dc4623a3444c8063085cf1c
> Author: David C. Lonie <david.lonie at kitware.com>
> Date:   Tue Oct 6 10:47:59 2015 -0400
>
>     Fix MTime bug in vtkTextMapper.
>
>     See http://www.vtk.org/Bug/view.php?id=15303. Thanks to
>     Luc Habert for the report and patch.
>
> diff --git a/Rendering/Core/vtkTextMapper.cxx
> b/Rendering/Core/vtkTextMapper.cxx
> index be4a968..9f5b67b 100644
> --- a/Rendering/Core/vtkTextMapper.cxx
> +++ b/Rendering/Core/vtkTextMapper.cxx
> @@ -485,7 +485,8 @@ void vtkTextMapper::UpdateQuad(vtkActor2D *actor, int
> dpi)
>      }
>
>    if (this->CoordsTime < actor->GetMTime() ||
> -      this->CoordsTime < this->TextProperty->GetMTime())
> +      this->CoordsTime < this->TextProperty->GetMTime() ||
> +      this->CoordsTime < this->TCoordsTime)
>      {
>      int text_bbox[4];
>      vtkTextRenderer *tren = vtkTextRenderer::GetInstance();
>
> Cheers,
> Dave
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151014/e1a7163e/attachment.html>


More information about the vtkusers mailing list