summaryrefslogtreecommitdiffstats
path: root/grapher/GraphWidget.cxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-07-29 10:49:06 +0200
committerTim Moore <timoore@redhat.com>2009-09-16 20:09:33 +0200
commitae98ab3529e00906645c9a2d0a30f36d9d534f3e (patch)
tree70a37e945cbaca32072c79f59d74863661cd5a0e /grapher/GraphWidget.cxx
parent688a8322340c2d7738472270a455fbfe5587a2d2 (diff)
downloadsystemtap-steved-ae98ab3529e00906645c9a2d0a30f36d9d534f3e.tar.gz
systemtap-steved-ae98ab3529e00906645c9a2d0a30f36d9d534f3e.tar.xz
systemtap-steved-ae98ab3529e00906645c9a2d0a30f36d9d534f3e.zip
Initialize CairoWidget origin of graph
* grapher/Graph.hxx (Graph constructor): add origin arguments * grapher/Graph.cxx: ditto * grapher/GraphWidget.cxx (on_expose_event): Use CairoWidget origin to position graphs.
Diffstat (limited to 'grapher/GraphWidget.cxx')
-rw-r--r--grapher/GraphWidget.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/grapher/GraphWidget.cxx b/grapher/GraphWidget.cxx
index 4a1e0918..53c7645d 100644
--- a/grapher/GraphWidget.cxx
+++ b/grapher/GraphWidget.cxx
@@ -70,8 +70,10 @@ namespace systemtap
cr->paint();
for (GraphList::iterator g = _graphs.begin(); g != _graphs.end(); ++g)
{
+ double x, y;
+ (*g)->getOrigin(x, y);
cr->save();
- cr->translate((*g)->_graphX, (*g)->_graphY);
+ cr->translate(x, y);
(*g)->draw(cr);
cr->restore();
}