diff --git a/src/graph/graph.cc b/src/graph/graph.cc index 64e2ae5..8b93a61 100644 --- a/src/graph/graph.cc +++ b/src/graph/graph.cc @@ -8,50 +8,6 @@ void Graph::svg_demo(Analyse::track_data_t track_data) { - - auto s = new SvgRect(); - - s->left = 50; - s->top = 80; - - s->width = 100; - s->height = 200; - - s->radius = 20; - - s->opacity = 0.8; - s->line_opacity = 0.5; - - s->color = "blue"; - s->line_color = "green"; - -// printf(R"()", 1000, 1000); -// printf("\n"); -// -// std::cout << " " << s.dump() << std::endl; -// -// printf("\n"); - - auto l = new SvgLine(); - l->start_x = 100; - l->start_y = 200; - - l->end_x = 300; - l->end_y = 400; - - auto sg = SvgGraph(1000, 2000); -// sg.insert(&s); -// sg.insert(&l); - - sg.insert(s); - sg.insert(l); - - std::cout << sg.dump() << std::endl; - - return; - - - // // for (uint32_t i = 0; i < track_data.size(); ++i) { // diff --git a/src/graph/svg/svg.h b/src/graph/svg/svg.h index 7808a29..c43c3b6 100644 --- a/src/graph/svg/svg.h +++ b/src/graph/svg/svg.h @@ -32,9 +32,12 @@ public: uint64_t end_x; uint64_t end_y; + // TODO: more options for svg-line + ~SvgLine() override = default; std::string dump() const override; + // TODO: SvgLine(...) }; class SvgRect : public SvgObject { @@ -55,4 +58,5 @@ public: ~SvgRect() override = default; std::string dump() const override; + SvgRect(uint64_t t, uint64_t l, uint64_t w, uint64_t h) : top(t), left(l), width(w), height(h) {} };