<div id="result_box" dir="ltr">Hi,<br><br>Only it does not solve, I&#39;m with the same problem and I could not solve.<br><br><br></div>Regards,<br>Paulo Amorim<br><br><br><br><div class="gmail_quote">2008/11/25 Peter F Bradshaw <span dir="ltr">&lt;<a href="mailto:pfb@exadios.com">pfb@exadios.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Liang Ma;<br>
<br>
Are you calling this-&gt;pvtkRenderer-&gt;Render() anywhere?<br>
<div><div></div><div class="Wj3C7c"><br>
On Mon, 24 Nov 2008, Liang Ma wrote:<br>
<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I tried to scale a 2D actor but it doesn&#39;t work. I tried GetPosition2Coordinate() function but it doesn&#39;t work. &nbsp;Also I tried to zoom the camera. It does not work either.<br>
&gt;<br>
&gt; Whould you give me some advices? Thanks.<br>
&gt;<br>
&gt; Regards<br>
&gt;<br>
&gt; Liang Ma<br>
&gt;<br>
&gt; Here is the code:<br>
&gt;<br>
&gt; &nbsp; vtkActor2D &nbsp; *pvtkActor;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;..........................<br>
&gt; &nbsp;this-&gt;pvtkActor-&gt;GetPositionCoordinate()-&gt;SetCoordinateSystemToNormalizedViewport();<br>
&gt; &nbsp;this-&gt;pvtkActor-&gt;GetPositionCoordinate()-&gt;SetValue(0.5, 0.5); &nbsp;// &nbsp;works, could move the actor to the center<br>
&gt; &nbsp;this-&gt;pvtkActor-&gt;GetPosition2Coordinate()-&gt;SetValue(0.9, 0.9); // does not work, no effect<br>
&gt; &nbsp;this-&gt;pvtkActor-&gt;GetProperty()-&gt;SetColor(1, 0, 0);<br>
&gt;<br>
&gt; the code for zoom:<br>
&gt;<br>
&gt; ////////////////////////////////////////////////////////////////////////<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; this-&gt;pvtkCamera = this-&gt;pvtkRenderer-&gt;GetActiveCamera ();<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; this-&gt;pvtkCamera-&gt;Zoom(5); &nbsp; &nbsp;// &nbsp; &nbsp; zoom doesn&#39;t work<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; this-&gt;pvtkRenderer-&gt;SetActiveCamera (this-&gt;pvtkCamera) ;<br>
&gt; ///////////////////////////////////////////////////////////////////////////<br>
&gt;<br>
<br>
</div></div>Cheers<br>
<br>
--<br>
Peter F Bradshaw: <a href="http://www.exadios.com" target="_blank">http://www.exadios.com</a> (public keys avaliable there).<br>
Personal site: <a href="http://personal.exadios.com" target="_blank">http://personal.exadios.com</a><br>
&quot;I love truth, and the way the government still uses it occasionally to<br>
&nbsp;keep us guessing.&quot; - Sam Kekovich.<br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>