100 point.x += aCenter.x;
108 point.y -= aCenter.y;
110 point.y += aCenter.y;
117 RotatePoint( &point, aCenter, aRotateCCW ? -900 : 900 );
124 wxASSERT( aPlotter !=
NULL );
126 static std::vector< wxPoint > cornerList;
132 cornerList.push_back( pos );
144 if( !already_filled || pen_size > 0 )
162 int currentMinDistance = INT_MAX;
163 int closestLineStart = 0;
172 closestLineStart = i;
199 bool forceNoFill = static_cast<bool>( aData );
271 for(
int ii = 0; ii < count; ii++ )
292 int xmin, xmax, ymin, ymax;
306 rect.
SetEnd( xmax, ymax );
342 msg.Printf( wxT(
"(%d, %d, %d, %d)" ), bBox.
GetOrigin().x,
void AddCorner(const wxPoint &aPosition)
wxString MessageTextFromValue(EDA_UNITS aUnits, int aValue, bool aAddUnitLabel, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
Plot settings, and plotting engines (PostScript, Gerber, HPGL and DXF)
PNG memory record (file in memory).
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Implementation of conversion functions that require both schematic and board internal units.
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
virtual void SetColor(COLOR4D color)=0
void GRPoly(EDA_RECT *ClipBox, wxDC *DC, int n, const wxPoint *Points, bool Fill, int width, COLOR4D Color, COLOR4D BgColor)
void MirrorHorizontal(const wxPoint &aCenter) override
Mirror the draw object along the horizontal (X) axis about aCenter point.
void MirrorVertical(const wxPoint &aCenter) override
Mirror the draw object along the MirrorVertical (Y) axis about aCenter point.
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
const BITMAP_OPAQUE add_graphical_segments_xpm[1]
void SetOrigin(const wxPoint &pos)
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_TYPE aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=NULL)=0
Draw a polygon ( filled or not )
bool PointOnEdge(const VECTOR2I &aP, int aAccuracy=0) const
Check if point aP lies on an edge or vertex of the line chain.
BITMAP_DEF GetMenuImage() const override
Return a pointer to an image to be used in menus.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
void RotatePoint(int *pX, int *pY, double angle)
The base class for create windows for drawing purpose.
void RevertYAxis()
Mirror the rectangle from the X axis (negate Y pos and size).
FILL_TYPE m_fill
The body fill type.
bool Contains(const wxPoint &aPoint) const
unsigned GetCornerCount() const
The base class for drawable items used by schematic library components.
void Append(int aX, int aY, bool aAllowDuplication=false)
Function Append()
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is contained within or on the bounding box of an item.
const wxPoint GetEnd() const
void Offset(const wxPoint &aOffset) override
Set the drawing object by aOffset from the current position.
void SetClosed(bool aClosed)
Function SetClosed()
FILL_TYPE GetFillMode() const
int compare(const LIB_ITEM &aOther, LIB_ITEM::COMPARE_FLAGS aCompareFlags=LIB_ITEM::COMPARE_FLAGS::NORMAL) const override
Provide the draw object specific comparison called by the == and < operators.
int GetPenWidth() const override
COMPARE_FLAGS
The list of flags used by the compare function.
const wxPoint GetOrigin() const
void SetEnd(int x, int y)
bool PointInside(const VECTOR2I &aPt, int aAccuracy=0, bool aUseBBoxCache=false) const
Check if point aP lies inside a polygon (any type) defined by the line chain.
#define MINIMUM_SELECTION_DISTANCE
bool ContinueEdit(const wxPoint aNextPoint) override
Continue an edit in progress at aPosition.
Define a library symbol object.
void print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset, void *aData, const TRANSFORM &aTransform) override
Print the item to aDC.
std::vector< wxPoint > m_PolyPoints
wxDC * GetPrintDC() const
#define STRUCT_DELETED
flag indication structures to be erased
static float distance(const SFVEC2UI &a, const SFVEC2UI &b)
void AddPoint(const wxPoint &aPoint)
void Rotate(const wxPoint &aCenter, bool aRotateCCW=true) override
Rotate the object about aCenter point.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Display basic info (type, part and convert) about the current item in message panel.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
void DeleteSegment(const wxPoint aPosition)
Delete the segment at aPosition.
Base plotter engine class.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Display basic info (type, part and convert) about the current item in message panel.
RENDER_SETTINGS * RenderSettings()
TRANSFORM DefaultTransform
void BeginEdit(const wxPoint aStartPoint) override
Begin drawing a component library draw item at aPosition.
Handle the component boundary box.
A base class for most all the KiCad significant classes used in schematics and boards.
std::vector< MSG_PANEL_ITEM > MSG_PANEL_ITEMS
bool Intersects(const EDA_RECT &aRect) const
Test for a common area between rectangles.
void EndEdit() override
End an object editing action.
const EDA_RECT GetBoundingBox() const override
int GetDefaultPenWidth() const
void MoveTo(const wxPoint &aPosition) override
Move a draw object to aPosition.
EDA_MSG_ITEM is used EDA_MSG_PANEL as the item type for displaying messages.
#define SKIP_STRUCT
flag indicating that the structure should be ignored
void RemoveCorner(int aIdx)
Message panel definition file.
LIB_POLYLINE(LIB_PART *aParent)
void CalcEdit(const wxPoint &aPosition) override
Calculates the attributes of an item at aPosition when it is being edited.
virtual int compare(const LIB_ITEM &aOther, LIB_ITEM::COMPARE_FLAGS aCompareFlags=LIB_ITEM::COMPARE_FLAGS::NORMAL) const
Provide the draw object specific comparison called by the == and < operators.
void Plot(PLOTTER *aPlotter, const wxPoint &aOffset, bool aFill, const TRANSFORM &aTransform) override
Plot the draw item using the plot object.
double DistanceLinePoint(const wxPoint &linePointA, const wxPoint &linePointB, const wxPoint &referencePoint)
Compute the distance between a line and a reference point Reference: http://mathworld....
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
EDA_RECT & Inflate(wxCoord dx, wxCoord dy)
Inflate the rectangle horizontally by dx and vertically by dy.
KICAD_T Type() const
Returns the type of object.
A color representation with 4 components: red, green, blue, alpha.