Commit f5e13e73 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell
Browse files

ENH: Store string dimensions in the image data.

Use the origin and spacing (not used here for anything else) to store
the dimensions of the rendered string. Especially useful when the image
is scaled to the next power of two.

Change-Id: I9bb1dd05c3c55899aeb8e7d51947f777ea170eb8
parent 6c43daec
......@@ -1016,6 +1016,10 @@ void vtkFreeTypeTools::PrepareImageData(vtkImageData *data,
data->SetOrigin(text_size[0], text_size[1], 0.0);
data->SetSpacing(text_size[0] / double(new_img_dims[0]),
text_size[1] / double(new_img_dims[1]),
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