[vtkusers] vtkBoxWidget2 initial size
Jochen K.
jochen.kling at email.de
Sun Jun 17 20:34:05 EDT 2012
Hi Pedro,
a vktWidgetRepresentation has to be retrieved from the vtkWidget2 object.
Then you can set position and size via it's bounds like so:
vtkSmartPointer<vtkBoxWidget2> boxWidget =
vtkSmartPointer<vtkBoxWidget2>::New();
boxWidget->SetInteractor(interactor);
boxWidget->SetEnabled(1);
vtkWidgetRepresentation *boxRep = boxWidget->GetRepresentation();
double bounds[] = {0, 5, -0.5, 0.5, -0.5, 0.5};
boxRep->PlaceWidget(bounds);
It's some kind of funny having to do it like this.
with best regards
Jochen
--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkBoxWidget2-initial-size-tp5713956p5713957.html
Sent from the VTK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120617/57831033/attachment.htm>
More information about the vtkusers
mailing list