I resolved the problem, it was because of the coordinates, by default they are relative among them ( the attachment point, the position and the position2 ) and I didn't take that into account.<br><br><div><span class="gmail_quote">
On 3/8/07, <b class="gmail_sendername">Amy Squillacote</b> <<a href="mailto:amy.squillacote@kitware.com">amy.squillacote@kitware.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Jesús,<br><br>Take a look at TestCaptionActor.tcl in VTK/Hybrid/Testing/Tcl. This test<br>demonstrates putting a bounding box around some text.<br><br>- Amy<br><br>Jesús Spínola wrote:<br>> Hello,<br>><br>> I want to put a text on the render window with a visible bounding box
<br>> around the text. I'm trying this with vtkCaptionActor2D but the text<br>> always appears on top of the bounding box and never inside it.<br>><br>> What I have to do to view the text inside the bounding box of the
<br>> vtkCaptionActor2D?<br>> Could some one post a code snippet that does this?<br>><br>> My code looks like this<br>><br>> vtkCaptionActor2D *captionActor = vtkCaptionActor2D::New();<br>> captionActor->SetCaption( "Some text....." );
<br>> captionActor->LeaderOff();<br>> captionActor->SetPosition( topLeftX, topLeftY );<br>> captionActor->SetPosition2( bottomRightX, bottomRighY );<br>><br>> Thanks!<br>> ------------------------------------------------------------------------
<br>><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">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">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br><br>--<br>Amy Squillacote<br>Kitware, Inc.
<br>28 Corporate Drive<br>Clifton Park, NY 12065<br>Phone: (518) 371-3971 x106<br><br></blockquote></div><br>