40 EDA_SHAPE( aShape, aLineWidth, aFillType )
116 static std::vector<VECTOR2I> cornerList;
123 cornerList.push_back( pt );
201 aPlotter->
MoveTo( pts[0] );
202 aPlotter->
LineTo( pts[1] );
203 aPlotter->
LineTo( pts[2] );
204 aPlotter->
LineTo( pts[3] );
249 unsigned ptCount = 0;
259 for(
unsigned ii = 0; ii < ptCount; ++ii )
260 buffer[ii] = poly.
CPoint( ii );
267 for(
size_t ii = 0; ii < ptCount; ++ii )
316 if(
color == COLOR4D::UNSPECIFIED )
324 unsigned ptCount = 0;
334 for(
unsigned ii = 0; ii < ptCount; ++ii )
335 buffer[ii] = poly.
CPoint( ii );
342 for(
size_t ii = 0; ii < ptCount; ++ii )
346 COLOR4D fillColor = COLOR4D::UNSPECIFIED;
353 if( fillColor != COLOR4D::UNSPECIFIED )
370 GRPoly( DC, ptCount, buffer,
true, 0, fillColor, fillColor );
374 GRPoly( DC, ptCount, buffer,
true, 0, fillColor, fillColor );
420 for(
SHAPE* shape : shapes )
429 for(
SHAPE* shape : shapes )
473 return wxEmptyString;
constexpr EDA_IU_SCALE schIUScale
BITMAPS
A list of all bitmap identifiers.
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
virtual void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList)
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
void move(const VECTOR2I &aMoveVector)
VECTOR2I getCenter() const
void rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle)
void flip(const VECTOR2I &aCentre, bool aFlipLeftRight)
FILL_T GetFillMode() const
virtual std::vector< SHAPE * > MakeEffectiveShapes(bool aEdgeOnly=false) const
Make a set of SHAPE objects representing the EDA_SHAPE.
void ShapeGetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList)
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
const VECTOR2I & GetStart() const
Return the starting point of the graphic.
COLOR4D GetFillColor() const
void SwapShape(EDA_SHAPE *aImage)
std::vector< VECTOR2I > GetRectCorners() const
std::vector< VECTOR2I > m_bezierPoints
wxString SHAPE_T_asString() const
A color representation with 4 components: red, green, blue, alpha.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
int GetMinPenWidth() const
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
virtual const COLOR4D & GetBackgroundColor() const =0
Return current background color settings.
wxDC * GetPrintDC() const
Base plotter engine class.
virtual void SetDash(int aLineWidth, PLOT_DASH_TYPE aLineStyle)=0
virtual void Circle(const VECTOR2I &pos, int diametre, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH)=0
void MoveTo(const VECTOR2I &pos)
virtual void Arc(const VECTOR2I &aCenter, const VECTOR2I &aStart, const VECTOR2I &aEnd, FILL_T aFill, int aWidth, int aMaxError)
Generic fallback: arc rendered as a polyline.
void FinishTo(const VECTOR2I &pos)
RENDER_SETTINGS * RenderSettings()
bool GetColorMode() const
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.
void LineTo(const VECTOR2I &pos)
virtual void PlotPoly(const std::vector< VECTOR2I > &aCornerList, FILL_T aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=nullptr)=0
Draw a polygon ( filled or not ).
virtual void Rect(const VECTOR2I &p1, const VECTOR2I &p2, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH)=0
virtual void SetColor(const COLOR4D &color)=0
Holds all the data relating to one schematic.
SCHEMATIC_SETTINGS & Settings() const
Base class for any item which can be embedded within the SCHEMATIC container class,...
SCHEMATIC * Schematic() const
Searches the item hierarchy to find a SCHEMATIC.
void SetLayer(SCH_LAYER_ID aLayer)
Set the layer this item is on.
PLOT_DASH_TYPE GetEffectiveLineStyle() const
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the layers the item is drawn on (which may be more than its "home" layer)
SCH_SHAPE(SHAPE_T aShape, int aLineWidth=0, FILL_T aFillType=FILL_T::NO_FILL, KICAD_T aType=SCH_SHAPE_T)
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
void Move(const VECTOR2I &aOffset) override
Move the item by aMoveVector to a new position.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
void SetStroke(const STROKE_PARAMS &aStroke) override
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
void Rotate(const VECTOR2I &aCenter) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
void Plot(PLOTTER *aPlotter, bool aBackground) const override
Plot the schematic item to aPlotter.
void AddPoint(const VECTOR2I &aPosition)
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
void PrintBackground(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
Print the (optional) backaground elements if they exist.
void Print(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
Print a schematic item.
int GetPenWidth() const override
STROKE_PARAMS GetStroke() const override
VECTOR2I GetPosition() const override
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
virtual size_t GetPointCount() const override
void Append(int aX, int aY, bool aAllowDuplication=false)
Append a new point at the end of the line chain.
const VECTOR2I & CPoint(int aIndex) const
Return a reference to a given point in the line chain.
const std::vector< VECTOR2I > & CPoints() const
SHAPE_LINE_CHAIN & Outline(int aIndex)
int NewOutline()
Creates a new hole in a given outline.
An abstract shape on 2D plane.
Simple container to manage line stroke parameters.
static void Stroke(const SHAPE *aShape, PLOT_DASH_TYPE aLineStyle, int aWidth, const KIGFX::RENDER_SETTINGS *aRenderSettings, std::function< void(const VECTOR2I &a, const VECTOR2I &b)> aStroker)
KIGFX::COLOR4D GetColor() const
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
A lower-precision version of StringFromValue().
#define DEFAULT_LINE_WIDTH_MILS
The default wire width in mils. (can be changed in preference menu)
static constexpr EDA_ANGLE & ANGLE_90
int CircleToEndSegmentDeltaRadius(int aInnerCircleRadius, int aSegCount)
void GRRect(wxDC *DC, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aWidth, const COLOR4D &aColor)
void GRCircle(wxDC *aDC, const VECTOR2I &aPos, int aRadius, int aWidth, const COLOR4D &aColor)
void GRFilledArc(wxDC *DC, const VECTOR2I &aStart, const VECTOR2I &aEnd, const VECTOR2I &aCenter, int width, const COLOR4D &Color, const COLOR4D &BgColor)
void GRLine(wxDC *DC, int x1, int y1, int x2, int y2, int width, const COLOR4D &Color, wxPenStyle aStyle)
void GRFilledRect(wxDC *DC, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aWidth, const COLOR4D &aColor, const COLOR4D &aBgColor)
void GRArc(wxDC *aDC, const VECTOR2I &aStart, const VECTOR2I &aEnd, const VECTOR2I &aCenter, int aWidth, const COLOR4D &aColor)
void GRPoly(wxDC *DC, int n, const VECTOR2I *Points, bool Fill, int width, const COLOR4D &Color, const COLOR4D &BgColor)
Draw a new polyline and fill it if Fill, in drawing space.
bool GetGRForceBlackPenState(void)
void GRFilledCircle(wxDC *aDC, const VECTOR2I &aPos, int aRadius, int aWidth, const COLOR4D &aStrokeColor, const COLOR4D &aFillColor)
Draw a circle onto the drawing context aDC centered at the user coordinates (x,y).
@ LAYER_SELECTION_SHADOWS
This file contains miscellaneous commonly used macros and functions.
#define UNIMPLEMENTED_FOR(type)
Message panel definition file.
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
Plot settings, and plotting engines (PostScript, Gerber, HPGL and DXF)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
constexpr int MilsToIU(int mils) const
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.