diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2015-01-06 22:51:48 +0300 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2015-01-06 22:51:48 +0300 |
commit | 5e100abe2545ba5f61edce541c91b63aa3e14347 (patch) | |
tree | 884f8b7778105a284385134df95860116c8f6909 /xs/src/libslic3r/SVG.hpp | |
parent | 713fcb5e8eabe21646b25febe43ac09f422370a0 (diff) |
Added several drawing methods to Slic3r::SVG
Diffstat (limited to 'xs/src/libslic3r/SVG.hpp')
-rw-r--r-- | xs/src/libslic3r/SVG.hpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xs/src/libslic3r/SVG.hpp b/xs/src/libslic3r/SVG.hpp index f312f4a3b..bb0d5adcf 100644 --- a/xs/src/libslic3r/SVG.hpp +++ b/xs/src/libslic3r/SVG.hpp @@ -15,11 +15,12 @@ class SVG std::string fill, stroke; SVG(const char* filename); - void AddLine(const Line &line); void AddLine(const IntersectionLine &line); - void draw(const ExPolygon &expolygon); - void draw(const Polygon &polygon); - void draw(const Polyline &polyline); + void draw(const Line &line, std::string stroke = "black"); + void draw(const ExPolygon &expolygon, std::string fill = "grey"); + void draw(const Polygon &polygon, std::string fill = "grey"); + void draw(const Polyline &polyline, std::string stroke = "black"); + void draw(const Point &point, std::string fill = "black", unsigned int radius = 3); void Close(); private: @@ -27,7 +28,7 @@ class SVG FILE* f; void path(const std::string &d, bool fill); - std::string get_path_d(const MultiPoint &polygon) const; + std::string get_path_d(const MultiPoint &mp, bool closed = false) const; }; } |