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/Graph.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'grapher/Graph.cxx') diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx index ec5e4035..e1ea01f6 100644 --- a/grapher/Graph.cxx +++ b/grapher/Graph.cxx @@ -9,11 +9,13 @@ namespace systemtap using namespace std; using namespace std::tr1; - Graph::Graph() - : _lineWidth(2), _autoScaling(true), _autoScrolling(true), + Graph::Graph(double x, double y) + : _graphX(0), _graphY(0), + _lineWidth(2), _autoScaling(true), _autoScrolling(true), _zoomFactor(1.0), _playButton(new CairoPlayButton), _left(0.0), _right(1.0), _top(5.0), _bottom(0.0) { + setOrigin(x, y); } -- cgit