[vtkusers] Get origin of vtkAxis in screen coordinates?
Elvis Stansvik
elvis.stansvik at orexplore.com
Wed Feb 8 04:20:48 EST 2017
Hi all,
I've been banging my head on this problem for a while: I need to get the
origin of a vtkAxis in X/Y screen coordinates, in order to position another
widget to line up with the axis.
I found this snippet in vtkChartXY's own internal UpdateLayout function:
// Get the screen coordinates for the origin, and move the axes there.
vtkVector2f origin(0.0);
vtkTransform2D* transform =
this->ChartPrivate->PlotCorners[0]->GetTransform();
transform->TransformPoints(origin.GetData(), origin.GetData(), 1);
But I don't have access to those transforms, and can't see a way to get at
them :/
What would be the best way to get the screen coordinates of a vtkAxis
origin? Or actually, what I really want is the bottom left corner of the
plot area, which in my case corresponds to the axis origin.
Thanks in advance,
Elvis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170208/8a889d68/attachment.html>
More information about the vtkusers
mailing list