diff options
author | Tim Moore <timoore@redhat.com> | 2009-12-01 13:34:12 +0100 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-12-02 19:37:40 +0100 |
commit | 06e217d9990635be43a59233d75c504385d1e243 (patch) | |
tree | 108a1b8eedc89194bfbca6a6feea92a026dcd179 /grapher/Graph.cxx | |
parent | 379c58568dbb247ed6583434ff4658c0794b977d (diff) | |
download | systemtap-steved-06e217d9990635be43a59233d75c504385d1e243.tar.gz systemtap-steved-06e217d9990635be43a59233d75c504385d1e243.tar.xz systemtap-steved-06e217d9990635be43a59233d75c504385d1e243.zip |
Account for zoom factor when choosing hover text
* grapher/Graph.cxx (getTimeAtPoint): Divide by _zoomFactor too.
Diffstat (limited to 'grapher/Graph.cxx')
-rw-r--r-- | grapher/Graph.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx index 1d478790..e7c03bd1 100644 --- a/grapher/Graph.cxx +++ b/grapher/Graph.cxx @@ -96,11 +96,11 @@ namespace systemtap cr->translate(0.0, _graphHeight); cr->scale(1.0, -1.0); GraphDataBase::TimeList::iterator lower - = std::lower_bound(graphData->times.begin(), graphData->times.end(), - _left); + = lower_bound(graphData->times.begin(), graphData->times.end(), + _left); GraphDataBase::TimeList::iterator upper - = std::upper_bound(graphData->times.begin(), graphData->times.end(), - _right); + = upper_bound(graphData->times.begin(), graphData->times.end(), + _right); // event bar if (graphData->style == GraphDataBase::EVENT) { @@ -265,6 +265,6 @@ namespace systemtap int64_t Graph::getTimeAtPoint(double x) { - return _left + (_right - _left) * ((x - 20.0)/_graphWidth); + return _left + (_right - _left) * ((x - 20.0)/(_zoomFactor * _graphWidth)); } } |