<div dir="ltr">Great! Glad we figured it out :)<div><br></div><div>Dave</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 25, 2016 at 11:43 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">Hi, David,<br><br>rep.SetPosition/rep.<wbr>SetPosition2 works. Thanks you very much! Cool!<span class=""><br><br>Thanks<br>Liu Peng<br><div><br><br></div>
 <span>
 </span>
<br>      在2016-10-25,"David Lonie" <<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>> 写道:
        </span><blockquote id="m_-199267674552139527isReplyContent" style="padding-left:1ex;margin:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid"><span class="">
        -----原始邮件-----<br>
        <b>发件人:</b>"David Lonie" <<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>> <br>
        <b>发送时间:</b>2016年10月25日 星期二<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>
        </span><b>主题:</b>Re: Re: Re: [vtkusers] Why is the text of vtkCaptionWidget displayed at the default position no matter what position value I set?<div><div class="h5"><br>
<br><div dir="ltr">Hmm...I don't deal with the widget / representation stuff very often, so sorry about the dead ends!<div><br></div><div>It looks like the representation also keeps track of positions and sets them on the caption actor, have you tried rep.SetPosition/rep.<wbr>SetPosition2?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 25, 2016 at 10:39 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">Hi,David,<br><br>Yes, I already call rep.SetAnchorPosition(pointer) to set the anchor position, which is also the attachment point.<br><br>Thanks<br><div>Liu Peng<br><br></div>
 <span>
 </span>
<br>      在2016-10-25,"David Lonie" <<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>> 写道:
        <blockquote id="m_-199267674552139527m_7576015287826805449isReplyContent" 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年10月25日 星期二<span><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>
        </span><b>主题:</b>Re: Re: [vtkusers] Why is the text of vtkCaptionWidget displayed at the default position no matter what position value I set?<div><div class="m_-199267674552139527h5"><br>
<br><div dir="ltr">Are you also setting the attachment point? From the vtkCaptionActor2D docs:<div><br></div> * To use the caption actor, you normally specify the Position and Position2<br> * coordinates (these are inherited from the vtkActor2D superclass). (Note<br> * that Position2 can be set using vtkActor2D's SetWidth() and SetHeight()<br> * methods.)  Position and Position2 define the size of the caption, and a<br> * third point, the AttachmentPoint, defines a point that the caption is<br> * associated with.<br><br>Also relevant:<br><br> * The trickiest part about using this class is setting Position, Position2,<br> * and AttachmentPoint correctly. These instance variables are<br> * vtkCoordinates, and can be set up in various ways. In default usage, the<br> * AttachmentPoint is defined in the world coordinate system, Position is the<br> * lower-left corner of the caption and relative to AttachmentPoint (defined<br> * in display coordaintes, i.e., pixels), and Position2 is relative to<br> * Position and is the upper-right corner (also in display<br> * coordinates).<div><br></div><div>HTH,</div><div>Dave</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 25, 2016 at 10:02 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">Hi, David,<br><br>I follow your tips. It doesn't work. The text is still displayed at the default position.<br><br>Thanks<br>Liu Peng <br><div><br><br></div>
 <span>
 </span>
<br>      在2016-10-24,"David Lonie" <<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>> 写道:
        <blockquote id="m_-199267674552139527m_7576015287826805449m_-6373727755063936461isReplyContent" style="padding-left:1ex;margin:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid"><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 is the text of vtkCaptionWidget displayed at the default position no matter what position value I set?<div><div class="m_-199267674552139527m_7576015287826805449h5"><br>
<br><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Oct 23, 2016 at 11:13 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi, VTK guys,<br><br>When I display a vtkCaptionWidget, I want to set the position of the text. So I call the vtkActor2D:;SetPostion() and SetPosition2(), but when the widget is displayed, the text is alway at the left bottom corner, why? Below is my C# code:<br>[snip]<br>rep.GetCaptionActor2D().GetTex<wbr>tActor().SetPosition(textPos1[<wbr>0], textPos1[1]);<br>rep.GetCaptionActor2D().GetTex<wbr>tActor().SetPosition2(textPos2<wbr>[0], textPos2[1]);<br></div></blockquote><div><br></div><div>Try just setting the position of the caption actor itself. When the caption actor renders, it sets the text actor's position. So,</div><div><br></div><div>rep.GetCaptionActor2D().SetPos<wbr>ition(textPos1[0], textPos1[1]);</div><div>rep.GetCaptionActor2D().SetPos<wbr>ition2(textPos2[0], textPos2[1]);</div><div><br></div><div>should get you what you want.</div><div><br></div><div>HTH,</div><div>Dave</div></div></div></div>
</div></div></blockquote><br><br><span title="neteasefooter"><p> </p></span></blockquote></div><br></div>
</div></div></blockquote><br><br><span title="neteasefooter"><p> </p></span></blockquote></div><br></div>
</div></div></blockquote><br><br><span title="neteasefooter"><p> </p></span></blockquote></div><br></div>