[vtkusers] How to put the text inside bounding box of vtkCaptionActor2D
Jesús Spínola
jspinola at gmail.com
Fri Mar 9 07:09:21 EST 2007
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.
On 3/8/07, Amy Squillacote <amy.squillacote at kitware.com> wrote:
>
> Hi Jesús,
>
> Take a look at TestCaptionActor.tcl in VTK/Hybrid/Testing/Tcl. This test
> demonstrates putting a bounding box around some text.
>
> - Amy
>
> Jesús Spínola wrote:
> > Hello,
> >
> > I want to put a text on the render window with a visible bounding box
> > around the text. I'm trying this with vtkCaptionActor2D but the text
> > always appears on top of the bounding box and never inside it.
> >
> > What I have to do to view the text inside the bounding box of the
> > vtkCaptionActor2D?
> > Could some one post a code snippet that does this?
> >
> > My code looks like this
> >
> > vtkCaptionActor2D *captionActor = vtkCaptionActor2D::New();
> > captionActor->SetCaption( "Some text....." );
> > captionActor->LeaderOff();
> > captionActor->SetPosition( topLeftX, topLeftY );
> > captionActor->SetPosition2( bottomRightX, bottomRighY );
> >
> > Thanks!
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
>
> --
> Amy Squillacote
> Kitware, Inc.
> 28 Corporate Drive
> Clifton Park, NY 12065
> Phone: (518) 371-3971 x106
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070309/377d3473/attachment.htm>
More information about the vtkusers
mailing list