vtkSliderRepresentation2D bug?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

vtkSliderRepresentation2D bug?

Taron
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



Reply | Threaded
Open this post in threaded view
|

Re: vtkSliderRepresentation2D bug?

Taron
Ah i forgot to mention:
I use vtk 5.6.1
Reply | Threaded
Open this post in threaded view
|

Re: vtkSliderRepresentation2D bug?

Butterfly
In reply to this post by Taron
I have the same problem, I use VTK 6.2.0, the issue still repeats.
Can anyone please help? Has anyone a fix for this or a workaround?