<div dir="ltr">My mistake -- the method is vtkCaptionActor2D::GetCaptionTextProperty. It also looks like the caption text actor is initialized to TEXT_SCALE_TO_PROP (see vtkTextActor's TextScaleMode documentation). This will always resize the text to fit inside a specified bounding box, instead of using the font size. Try:<div><br></div><div>captionActor->GetTextActor()->SetTextScaleModeToNone();</div><div>captionActor->GetCaptionTextProperty()->SetFontSize(fontSize);</div><div><br></div><div>HTH,</div><div>Dave</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 20, 2016 at 10:15 AM, Liu_tj <span dir="ltr"><<a href="mailto:tjlp@netease.com" target="_blank">tjlp@netease.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi, David,</div><div><br></div><div>There is no member method GetTextProperty() for vtkCaptionActor2D. No matter how much the font size is, the display is the same. And I found a similar post <a href="http://public.kitware.com/pipermail/vtkusers/2004-June/024902.html" target="_blank">http://public.kitware.com/<wbr>pipermail/vtkusers/2004-June/<wbr>024902.html</a> which is not answered.<br></div>
<span>
</span>
<br> 在2016-09-20,"David Lonie" <<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>> 写道:
<blockquote style="padding-left:1ex;margin:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid">
-----原始邮件-----<br>
<b>发件人:</b>"David Lonie" <<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>> <br>
<b>发送时间:</b>2016年09月20日 星期二<br>
<b>收件人:</b>"Liu_tj" <<a href="mailto:tjlp@netease.com" target="_blank">tjlp@netease.com</a>><br>
<b>抄送:</b>"vtkusers" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
<b>主题:</b>Re: [vtkusers] Why the vtkTextProperty.SetFontSize() does not take effect?<br>
<br><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Sep 17, 2016 at 11:26 AM, Liu_tj <span dir="ltr"><<a href="mailto:tjlp@netease.com" target="_blank">tjlp@netease.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi, <br><br>I use vtkCaptionWidget to display text annotation on 3D model. My issue is the font size of the text. Below is my C# code:<br><br>vtkCaptionRepresentation rep = vtkCaptionRepresentation.New()<wbr>;<br>rep.GetCaptionActor2D().ThreeD<wbr>imensionalLeaderOff();<br>rep.GetCaptionActor2D().GetTex<wbr>tActor().GetTextProperty().<wbr>SetFontSize(100);<br>rep.GetCaptionActor2D().GetTex<wbr>tActor().GetTextProperty().Set<wbr>FontFamily(4);<br>rep.GetCaptionActor2D().GetTex<wbr>tActor().GetTextProperty().<wbr>SetFontFile("simsunb.ttf");<br>rep.GetCaptionActor2D().GetCap<wbr>tionTextProperty().SetColor(0.<wbr>0, 1.0, 0.0);</div></blockquote><div><br></div><div>Try setting it on rep.GetCaptionActor2D().<wbr>GetTextProperty() instead of rep.GetCaptionActor2D().<wbr>GetTextActor().<wbr>GetTextProperty().</div><div><br></div><div>Dave</div></div></div></div>
</blockquote><br><br><span title="neteasefooter"><p> </p></span></blockquote></div><br></div>