Commit f23c7b26 authored by David C. Lonie's avatar David C. Lonie
Browse files

Manually mark text buffer images as modified.

If the image doesn't need to be rescaled, it is possible that only
vtkImageData::GetScalarPointer will be called to draw on the image,
which will not update the MTime. This was preventing the image rendering
classes from updating textures appropriately.

Change-Id: If5071ab6146ce907131f910c396639ce9e361d06
parent dbf5b5fa
...@@ -1111,6 +1111,11 @@ bool vtkFreeTypeTools::RenderStringInternal(vtkTextProperty *tprop, ...@@ -1111,6 +1111,11 @@ bool vtkFreeTypeTools::RenderStringInternal(vtkTextProperty *tprop,
memcpy(metaData.rgba, origColor, 3 * sizeof(unsigned char)); memcpy(metaData.rgba, origColor, 3 * sizeof(unsigned char));
} }
// Mark the image data as modified, as it is possible that only
// vtkImageData::Get*Pointer methods will be called, which do not update the
// MTime.
data->Modified();
// Render image // Render image
return this->PopulateData(str, data, metaData); return this->PopulateData(str, data, metaData);
} }
......
...@@ -712,6 +712,11 @@ bool vtkMatplotlibMathTextUtilities::RenderString(const char *str, ...@@ -712,6 +712,11 @@ bool vtkMatplotlibMathTextUtilities::RenderString(const char *str,
} }
} }
// Mark the image data as modified, as it is possible that only
// vtkImageData::Get*Pointer methods will be called, which do not update the
// MTime.
image->Modified();
// Determine the dimensions of the rotated image // Determine the dimensions of the rotated image
double angleDeg = tprop->GetOrientation(); double angleDeg = tprop->GetOrientation();
// Save some time if no rotation needed // Save some time if no rotation needed
......
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