103 return wxPoint(0, 0);
112 for( i = 0; i < imax; i++ )
121 for( i = 0; i < imax; i++ )
133 for( i = 0; i < imax; i++ )
142 for( i = 0; i < imax; i++ )
152 int rot_angle = aRotateCCW ? -900 : 900;
165 wxASSERT( aPlotter !=
NULL );
167 static std::vector< wxPoint > cornerList;
173 cornerList.push_back( pos );
185 if( !already_filled || pen_size > 0 )
208 bool forceNoFill = static_cast<bool>( aData );
214 std::vector<wxPoint> PolyPointsTraslated;
221 PolyPointsTraslated.clear();
246 int mindist = std::max( aAccuracy +
GetPenWidth() / 2,
284 for(
unsigned ii = 1; ii < count; ii++ )
305 int xmin, xmax, ymin, ymax;
322 rect.
SetEnd( xmax, ymax );
340 aList.emplace_back(
_(
"Line Width" ), msg );
342 msg.Printf( wxT(
"(%d, %d, %d, %d)" ),
348 aList.emplace_back(
_(
"Bounding Box" ), msg );
354 return wxPoint(0, 0);
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)
void MoveTo(const wxPoint &aPosition) override
Move a draw object to aPosition.
const wxPoint GetOffset() const
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.
virtual void SetColor(COLOR4D color)=0
LIB_BEZIER(LIB_PART *aParent)
std::vector< wxPoint > m_BezierPoints
void GetPoly(std::vector< wxPoint > &aOutput, int aMinSegLen=0)
Convert a Bezier curve to a polygon.
void GRPoly(EDA_RECT *ClipBox, wxDC *DC, int n, const wxPoint *Points, bool Fill, int width, COLOR4D Color, COLOR4D BgColor)
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is contained within or on the bounding box of an item.
void Plot(PLOTTER *aPlotter, const wxPoint &aOffset, bool aFill, const TRANSFORM &aTransform) override
Plot the draw item using the plot object.
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
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 )
void RotatePoint(int *pX, int *pY, double angle)
The base class for create windows for drawing purpose.
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 RevertYAxis()
Mirror the rectangle from the X axis (negate Y pos and size).
wxPoint GetPosition() const override
FILL_TYPE m_fill
The body fill type.
bool Contains(const wxPoint &aPoint) const
The base class for drawable items used by schematic library components.
bool TestSegmentHit(const wxPoint &aRefPoint, wxPoint aStart, wxPoint aEnd, int aDist)
Test if aRefPoint is with aDistance on the line defined by aStart and aEnd.
int GetWidth() const override
unsigned GetCornerCount() const
const wxPoint GetEnd() const
void Offset(const wxPoint &aOffset) override
Set the drawing object by aOffset from the current position.
void print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset, void *aData, const TRANSFORM &aTransform) override
Print the item to aDC.
FILL_TYPE GetFillMode() const
void MirrorHorizontal(const wxPoint &aCenter) override
Mirror the draw object along the horizontal (X) axis about aCenter point.
void Rotate(const wxPoint &aCenter, bool aRotateCCW=true) override
Rotate the object about aCenter point.
COMPARE_FLAGS
The list of flags used by the compare function.
const wxPoint GetOrigin() const
void SetEnd(int x, int y)
std::vector< wxPoint > m_PolyPoints
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.
#define MINIMUM_SELECTION_DISTANCE
Define a library symbol object.
wxDC * GetPrintDC() const
#define STRUCT_DELETED
flag indication structures to be erased
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.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Base plotter engine class.
Bezier curves to polygon converter.
RENDER_SETTINGS * RenderSettings()
TRANSFORM DefaultTransform
Handle the component boundary box.
void MirrorVertical(const wxPoint &aCenter) override
Mirror the draw object along the MirrorVertical (Y) axis about aCenter point.
A base class for most all the KiCad significant classes used in schematics and boards.
bool Intersects(const EDA_RECT &aRect) const
Test for a common area between rectangles.
int GetDefaultPenWidth() const
int GetMinPenWidth() const
#define SKIP_STRUCT
flag indicating that the structure should be ignored
Message panel definition file.
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.
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.
int GetPenWidth() const override
KICAD_T Type() const
Returns the type of object.
Define a bezier curve graphic body item.
A color representation with 4 components: red, green, blue, alpha.