73 int aStrokeWidth = 0 ) :
135 int aLineWidth, std::vector<VECTOR2I>& aPolygon )
const;
144 int aLineWidth,
void* aData =
nullptr )
const;
147 const char* aToken )
const;
Represent basic circle geometry with utility geometry functions.
A color representation with 4 components: red, green, blue, alpha.
A color representation with 4 components: red, green, blue, alpha.
Abstract interface for drawing on a 2D-surface.
Decorative shape (arrowhead, circle, square) at the start or end of a graphic line,...
int GetLength() const
Along-line size. 0 = auto.
const STROKE_PARAMS & GetStroke() const
static constexpr double DEFAULT_RATIO_LENGTH
int GetWidth() const
Perpendicular size. 0 = auto.
int GetShortenDepth(int aLineWidth) const
Return how far the line should be shortened at this ending.
bool operator==(const LINE_ENDING &aOther) const
void SetStroke(const STROKE_PARAMS &aStroke)
void Draw(KIGFX::GAL &aGal, const VECTOR2I &aPoint, const EDA_ANGLE &aTangent, double aLineWidth, const KIGFX::COLOR4D &aColor) const
static wxString StyleToToken(LINE_ENDING_STYLE aStyle)
void SetLength(int aLength)
void SetUniformSize(int aSize)
void SetStyle(LINE_ENDING_STYLE aStyle)
int GetCurveOrientationDepth(int aLineWidth) const
Return how far along a curved body to look when orienting this ending.
void SetWidth(int aWidth)
LINE_ENDING_STYLE m_style
static const int s_defaultChoiceCount
VECTOR2I GetEffectiveSize(int aLineWidth) const
Return the rendered size per axis, applying auto-sizing when length or width is 0.
static constexpr double DEFAULT_RATIO_WIDTH
void SetStrokeWidth(int aWidth)
static LINE_ENDING_STYLE TokenToStyle(const wxString &aToken)
int m_length
Along-line axis. 0 = auto (ratio * line width).
LINE_ENDING_STYLE GetStyle() const
void GetShapes(const VECTOR2I &aPoint, const EDA_ANGLE &aTangent, int aLineWidth, std::vector< VECTOR2I > &aPolygon) const
Generate ending geometry as polygon vertices at the given point and direction.
bool operator!=(const LINE_ENDING &aOther) const
static const LINE_ENDING_STYLE s_defaultChoiceOrder[]
Dropdown display order for line ending style choosers.
static int StyleToChoiceIndex(LINE_ENDING_STYLE aStyle)
Return the dropdown index for the given style, or 0 (NONE) if not found.
void Plot(PLOTTER *aPlotter, const VECTOR2I &aPoint, const EDA_ANGLE &aTangent, int aLineWidth, void *aData=nullptr) const
int m_width
Perpendicular axis. 0 = auto.
int GetStrokeWidth() const
Outline stroke width.
LINE_ENDING(LINE_ENDING_STYLE aStyle, int aLength=0, int aWidth=0, int aStrokeWidth=0)
void Format(OUTPUTFORMATTER *aOut, const EDA_IU_SCALE &aIuScale, const char *aToken) const
Base plotter engine class.
Simple container to manage line stroke parameters.
LINE_ENDING_STYLE
Line ending styles for graphic lines, arcs, and beziers.
The Cairo implementation of the graphics abstraction layer.
LINE_STYLE
Dashed line types.
VECTOR2< int32_t > VECTOR2I