20#ifndef GRAPHICS_IMPORTER_PL_EDITOR_H
21#define GRAPHICS_IMPORTER_PL_EDITOR_H
52 const COLOR4D& aFillColor )
override;
58 const COLOR4D& aFillColor )
override;
60 void AddText(
const VECTOR2D& aOrigin,
const wxString& aText,
double aHeight,
double aWidth,
double aThickness,
62 const COLOR4D& aColor )
override;
85 void addPolyline(
const std::vector<VECTOR2D>& aPoints,
double aWidth,
bool aClose );
94 const EDA_ANGLE& aRotation,
double aStartRadians,
95 double aSweepRadians )
const;
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
void addPolyline(const std::vector< VECTOR2D > &aPoints, double aWidth, bool aClose)
Add a run of points as segments, closing back to the first point when asked.
std::vector< VECTOR2D > flattenEllipseArc(const VECTOR2D &aCenter, double aMajorRadius, double aMinorRadius, const EDA_ANGLE &aRotation, double aStartRadians, double aSweepRadians) const
Walk an elliptical arc, which covers circles and arcs as well.
GRAPHICS_IMPORTER_PL_EDITOR()
double mapLineWidth(const IMPORTED_STROKE &aStroke) const
The line width to draw a stroke with, in millimetres.
void AddEllipseArc(const VECTOR2D &aCenter, double aMajorRadius, double aMinorRadius, const EDA_ANGLE &aRotation, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aEndAngle, const IMPORTED_STROKE &aStroke) override
Create an object representing an elliptical arc.
void AddText(const VECTOR2D &aOrigin, const wxString &aText, double aHeight, double aWidth, double aThickness, double aOrientation, GR_TEXT_H_ALIGN_T aHJustify, GR_TEXT_V_ALIGN_T aVJustify, const COLOR4D &aColor) override
Create an object representing a text.
void AddArc(const VECTOR2D &aCenter, const VECTOR2D &aStart, const EDA_ANGLE &aAngle, const IMPORTED_STROKE &aStroke) override
Create an object representing an arc.
void addSegment(const VECTOR2D &aStart, const VECTOR2D &aEnd, double aWidth)
DS_DATA_ITEM_POLYGONS * m_polygons
All filled areas go into one item, the way a traced logo is one object.
VECTOR2D mapPoint(const VECTOR2D &aPoint) const
Scale and offset an imported point into the drawing sheet's millimetres.
std::vector< std::unique_ptr< DS_DATA_ITEM > > m_dataItems
void AddSpline(const VECTOR2D &aStart, const VECTOR2D &aBezierControl1, const VECTOR2D &aBezierControl2, const VECTOR2D &aEnd, const IMPORTED_STROKE &aStroke) override
Create an object representing an arc.
std::vector< std::unique_ptr< DS_DATA_ITEM > > & GetDataItems()
The imported items, which the caller takes over.
void AddLine(const VECTOR2D &aOrigin, const VECTOR2D &aEnd, const IMPORTED_STROKE &aStroke) override
Create an object representing a line segment.
void AddPolygon(const std::vector< VECTOR2D > &aVertices, const IMPORTED_STROKE &aStroke, bool aFilled, const COLOR4D &aFillColor) override
Create an object representing a polygon.
void addFilledPolygon(const std::vector< VECTOR2D > &aPoints)
Add a run of points as one contour of the filled polygon item.
void AddCircle(const VECTOR2D &aCenter, double aRadius, const IMPORTED_STROKE &aStroke, bool aFilled, const COLOR4D &aFillColor) override
Create an object representing a circle.
void AddEllipse(const VECTOR2D &aCenter, double aMajorRadius, double aMinorRadius, const EDA_ANGLE &aRotation, const IMPORTED_STROKE &aStroke, bool aFilled, const COLOR4D &aFillColor=COLOR4D::UNSPECIFIED) override
Create an object representing a closed ellipse.
A clone of IMPORTED_STROKE, but with floating-point width.
A color representation with 4 components: red, green, blue, alpha.
GR_TEXT_H_ALIGN_T
This is API surface mapped to common.types.HorizontalAlignment.
GR_TEXT_V_ALIGN_T
This is API surface mapped to common.types.VertialAlignment.
VECTOR2< double > VECTOR2D