From ae98ab3529e00906645c9a2d0a30f36d9d534f3e Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Wed, 29 Jul 2009 10:49:06 +0200 Subject: 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. --- grapher/GraphWidget.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'grapher/GraphWidget.cxx') 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(); } -- cgit