PrusaSlicer-NonPlainar/xs/src/libslic3r/SVG.hpp

37 lines
895 B
C++
Raw Normal View History

#ifndef slic3r_SVG_hpp_
#define slic3r_SVG_hpp_
#include <myinit.h>
2015-01-06 15:26:15 +00:00
#include "ExPolygon.hpp"
#include "Line.hpp"
2013-10-26 12:41:37 +00:00
#include "TriangleMesh.hpp"
namespace Slic3r {
class SVG
{
public:
2013-10-26 12:41:37 +00:00
bool arrows;
2015-01-06 15:26:15 +00:00
std::string fill, stroke;
SVG(const char* filename);
2013-10-26 12:41:37 +00:00
void AddLine(const IntersectionLine &line);
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();
2015-01-06 15:26:15 +00:00
private:
std::string filename;
FILE* f;
void path(const std::string &d, bool fill);
std::string get_path_d(const MultiPoint &mp, bool closed = false) const;
};
}
#endif