[vtkusers] vtkXYPlotActor: ViewportToPlotCoordinate issue
Mathieu Coursolle
mcoursolle at rogue-research.com
Fri Mar 13 11:51:27 EDT 2009
Hi VTK users/developers,
I am using vtkXYPlotActor and I need to convert mouse event position
into
plot position.
double coordinates[2] = {0.0, 0.0};
thePlot->SetViewportCoordinate(inX, inY);
thePlot->ViewportToPlotCoordinate(theRenderer);
thePlot->GetPlotCoordinate(coordinates);
I would except the previous code to work:
1) I set the viewport coordinates.
2) Convert to plot coordinates.
3) Retrieve the plot coordinates.
However, I stepped in the code and realized that
ViewportToPlotCoordinate(...)
sets the viewportCoordinates.
Am I missing something here?
If I read the viewportCoordinates, it returns the right value:
double coordinates[2] = {0.0, 0.0};
thePlot->SetViewportCoordinate(inX, inY);
thePlot->ViewportToPlotCoordinate(theRenderer);
thePlot->GetViewportCoordinate(coordinates);
Thanks,
Mathieu
____________________
Mathieu Coursolle, M.Ing.
Rogue Research Inc.
www.rogue-research.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090313/0563d253/attachment.htm>
More information about the vtkusers
mailing list