summaryrefslogtreecommitdiffstats
path: root/grapher/Graph.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'grapher/Graph.cxx')
-rw-r--r--grapher/Graph.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx
index 55ffcdf2..57f1dc9a 100644
--- a/grapher/Graph.cxx
+++ b/grapher/Graph.cxx
@@ -205,4 +205,11 @@ namespace systemtap
return (_left
+ (_right - _left) * ((x - _xOffset)/(_zoomFactor * _graphWidth)));
}
+
+ void Graph::window2GraphCoords(double x, double y,
+ double& xgraph, double& ygraph)
+ {
+ xgraph = x -_xOffset;
+ ygraph = -y + _yOffset + _graphHeight;
+ }
}