summaryrefslogtreecommitdiffstats
path: root/grapher/Graph.cxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-07-29 13:11:10 +0200
committerTim Moore <timoore@redhat.com>2009-09-30 20:25:36 +0200
commitbb91631807ad833a92d011895ad7ca1872e02745 (patch)
treecf3c8f2611a27ade0f0b792c40a0533dc030145e /grapher/Graph.cxx
parent27993a166c3ff2c33f778da4d96726666aadfab9 (diff)
downloadsystemtap-steved-bb91631807ad833a92d011895ad7ca1872e02745.tar.gz
systemtap-steved-bb91631807ad833a92d011895ad7ca1872e02745.tar.xz
systemtap-steved-bb91631807ad833a92d011895ad7ca1872e02745.zip
Draw multiple graphs
* grapher/Graph.cxx (Graph constructor): Initialize graph dimensions. (draw): Don't clear the drawing area. * grapher/GraphWidget.hxx (GraphWidget): Add dimensions and on_size_request() method. * grapher/GraphWidget.cxx (GraphWidget constructor): Initialize dimensions. (addGraph): New method. (on_size_request): New method to pass widget's size to parent widgets * grapher/grapher.cxx (GrapherWindow constructor): add "add graph" action. (addGraph): New method.
Diffstat (limited to 'grapher/Graph.cxx')
-rw-r--r--grapher/Graph.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx
index e1ea01f6..7f9b2607 100644
--- a/grapher/Graph.cxx
+++ b/grapher/Graph.cxx
@@ -10,7 +10,8 @@ namespace systemtap
using namespace std::tr1;
Graph::Graph(double x, double y)
- : _graphX(0), _graphY(0),
+ : _width(600), _height(200), _graphX(0), _graphY(0),
+ _graphWidth(580), _graphHeight(180),
_lineWidth(2), _autoScaling(true), _autoScrolling(true),
_zoomFactor(1.0), _playButton(new CairoPlayButton),
_left(0.0), _right(1.0), _top(5.0), _bottom(0.0)
@@ -78,10 +79,6 @@ namespace systemtap
double horizScale = _zoomFactor * _graphWidth / ( _right - _left);
cr->translate(20.0, 0.0);
cr->set_line_width(_lineWidth);
- cr->save();
- cr->set_source_rgba(0.0, 0.0, 0.0, 1.0);
- cr->paint();
- cr->restore();
for (DatasetList::iterator itr = _datasets.begin(), e = _datasets.end();
itr != e;