[vtkusers] vtkSliderRepresentation2D bug?
Taron
taron2000 at gmx.de
Fri Aug 19 05:37:41 EDT 2011
Hi everybody,
I found a strange behaviour of vtkSliderRepresentation2D.
I added it to a vtkSliderWidget and it worked so far. Then i did the
following:
SliderRepresentation2D->GetPoint1Coordinate()->SetCoordinateSystemToDisplay();
SliderRepresentation2D->GetPoint2Coordinate()->SetCoordinateSystemToDisplay();
SliderRepresentation2D->GetPoint1Coordinate()->SetValue(50,50);
SliderRepresentation2D->GetPoint2Coordinate()->SetValue(100,50);
This represents a horizontal slider of length 50 pixel, starting at
coordinate (50,50);
If I resize the window, evreything works as expected, the slider does not
move and does not change size, but if i make a vertical slider like this,
SliderRepresentation2D->GetPoint1Coordinate()->SetCoordinateSystemToDisplay();
SliderRepresentation2D->GetPoint2Coordinate()->SetCoordinateSystemToDisplay();
SliderRepresentation2D->GetPoint1Coordinate()->SetValue(50,50);
SliderRepresentation2D->GetPoint2Coordinate()->SetValue(50,100);
the behaviour changes. Now if I resize the window the slider changes the
vertical position (y-coordinate) and the lenght. Its somehow related to the
display width/height ratio, because the coordinates are right if the ratio
is one.
I guess this is a bug, or is this behavior intended. Has anyone a fix for
this or a workaround?
Thanks
Klaus
--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkSliderRepresentation2D-bug-tp4715056p4715056.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list