26#ifndef SVG_IMPORT_PLUGIN_H
27#define SVG_IMPORT_PLUGIN_H
48 return "Scalable Vector Graphics";
53 static std::vector<std::string> exts = {
"svg" };
65 void ReportMsg(
const wxString& aMessage )
override;
68 bool Load(
const wxString& aFileName )
override;
76 void DrawPath(
const float* aPoints,
int aNumPoints,
bool aClosedPath,
80 std::vector<VECTOR2D>& aGeneratedPoints );
85 bool aFilled,
const COLOR4D& aFillColor );
Interface for vector graphics import plugins.
A clone of IMPORTED_STROKE, but with floating-point width.
A color representation with 4 components: red, green, blue, alpha.
const wxString & GetMessages() const override
void DrawCubicBezierPath(const float *aPoints, int aNumPoints, std::vector< VECTOR2D > &aGeneratedPoints)
void DrawPolygon(const std::vector< VECTOR2D > &aPoints, const IMPORTED_STROKE &aStroke, bool aFilled, const COLOR4D &aFillColor)
virtual BOX2D GetImageBBox() const override
Return image bounding box from original imported file.
GRAPHICS_IMPORTER_BUFFER m_internalImporter
struct NSVGimage * m_parsedImage
void DrawLineSegments(const std::vector< VECTOR2D > &aPoints, const IMPORTED_STROKE &aStroke)
bool Import() override
Actually imports the file.
const std::vector< std::string > GetFileExtensions() const override
Return a vector of the file extensions handled by this plugin.
virtual double GetImageWidth() const override
Return image width from original imported file.
bool LoadFromMemory(const wxMemoryBuffer &aMemBuffer) override
Set memory buffer with content for import.
bool Load(const wxString &aFileName) override
Load file for import.
const wxString GetName() const override
Return the plugin name.
void DrawCubicBezierCurve(const float *aPoints, std::vector< VECTOR2D > &aGeneratedPoints)
virtual double GetImageHeight() const override
Return image height from original imported file.
void DrawPath(const float *aPoints, int aNumPoints, bool aClosedPath, const IMPORTED_STROKE &aStroke, bool aFilled, const COLOR4D &aFillColor)
void ReportMsg(const wxString &aMessage) override
Definition of file extensions used in Kicad.