[vtkusers] Why the vtkTextProperty.SetFontSize() does not take effect?
Liu_tj
tjlp at netease.com
Sat Sep 17 11:26:48 EDT 2016
Hi,
I use vtkCaptionWidget to display text annotation on 3D model. My issue is the font size of the text. Below is my C# code:
vtkCaptionRepresentation rep = vtkCaptionRepresentation.New();
rep.GetCaptionActor2D().ThreeDimensionalLeaderOff();
rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontSize(100);
rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontFamily(4);
rep.GetCaptionActor2D().GetTextActor().GetTextProperty().SetFontFile("simsunb.ttf");
rep.GetCaptionActor2D().GetCaptionTextProperty().SetColor(0.0, 1.0, 0.0);
When the font size is from 100 to 50, the text is smaller; but if the size is from 50 to 25 to 10, the text size keeps the same. Why?
Thanks
Liu Peng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160917/f879f803/attachment.html>
More information about the vtkusers
mailing list