summaryrefslogtreecommitdiffstats
path: root/grapher/StapParser.cxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-12-01 19:05:09 +0100
committerTim Moore <timoore@redhat.com>2009-12-02 19:39:37 +0100
commit6197b0dc80c4f87000d26213293fe2cb72fbe081 (patch)
tree23e7b4716f9d618e0891d67cee127c614177b370 /grapher/StapParser.cxx
parent06e217d9990635be43a59233d75c504385d1e243 (diff)
downloadsystemtap-steved-6197b0dc80c4f87000d26213293fe2cb72fbe081.tar.gz
systemtap-steved-6197b0dc80c4f87000d26213293fe2cb72fbe081.tar.xz
systemtap-steved-6197b0dc80c4f87000d26213293fe2cb72fbe081.zip
Refactor drawing of different styles of graph into classes
* grapher/GraphStyle.cxx: New file * grapher/GraphStyle.hxx: New file * grapher/Graph(draw): Move much drawing code to GraphStyle::draw
Diffstat (limited to 'grapher/StapParser.cxx')
-rw-r--r--grapher/StapParser.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/grapher/StapParser.cxx b/grapher/StapParser.cxx
index ddc14b2d..af5f2d7d 100644
--- a/grapher/StapParser.cxx
+++ b/grapher/StapParser.cxx
@@ -102,7 +102,7 @@ vector<string> commaSplit(const boost::sub_range<Glib::ustring>& range)
std::tr1::shared_ptr<GraphData<double> >
dataSet(new GraphData<double>);
if (style == "dot")
- dataSet->style = GraphDataBase::DOT;
+ dataSet->style = &GraphStyleDot::instance;
dataSet->color[0] = (hexColor >> 16) / 255.0;
dataSet->color[1] = ((hexColor >> 8) & 0xff) / 255.0;
dataSet->color[2] = (hexColor & 0xff) / 255.0;
@@ -114,7 +114,7 @@ vector<string> commaSplit(const boost::sub_range<Glib::ustring>& range)
{
std::tr1::shared_ptr<GraphData<string> >
dataSet(new GraphData<string>);
- dataSet->style = GraphDataBase::EVENT;
+ dataSet->style = &GraphStyleEvent::instance;
dataSet->color[0] = (hexColor >> 16) / 255.0;
dataSet->color[1] = ((hexColor >> 8) & 0xff) / 255.0;
dataSet->color[2] = (hexColor & 0xff) / 255.0;