Added several drawing methods to Slic3r::SVG

This commit is contained in:
Alessandro Ranellucci 2015-01-06 20:51:48 +01:00
parent 713fcb5e8e
commit 5e100abe25
2 changed files with 39 additions and 22 deletions

View file

@ -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;
};
}