60 wxT(
"Cannot swap no connect data with invalid item." ) );
63 std::swap(
m_pos, item->m_pos );
64 std::swap(
m_size, item->m_size );
91 aItemList.push_back( item );
100 return std::max(
Schematic()->Settings().m_DefaultLineWidth, 1 );
109 int pX =
m_pos.x + aOffset.x;
110 int pY =
m_pos.y + aOffset.y;
113 GRLine(
nullptr, DC, pX - half, pY - half, pX + half, pY + half, penWidth,
color );
114 GRLine(
nullptr, DC, pX + half, pY - half, pX - half, pY + half, penWidth,
color );
144 return m_pos == aPosition;
152 wxPoint dist = aPosition -
m_pos;
154 if( ( std::abs( dist.x ) <=
delta ) && ( std::abs( dist.y ) <=
delta ) )
void FinishTo(const wxPoint &pos)
std::vector< wxPoint > GetConnectionPoints() const override
Add all the connection points for this item to aPoints.
Plot settings, and plotting engines (PostScript, Gerber, HPGL and DXF)
int GetPenWidth() const override
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
wxPoint m_pos
Position of the no connect object.
SCHEMATIC * Schematic() const
Searches the item hierarchy to find a SCHEMATIC.
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
void SetOrigin(const wxPoint &pos)
void GetEndPoints(std::vector< DANGLING_END_ITEM > &aItemList) override
Add the schematic item end points to aItemList if the item has end points.
void RotatePoint(int *pX, int *pY, double angle)
SCH_NO_CONNECT(const wxPoint &pos=wxPoint(0, 0))
bool Contains(const wxPoint &aPoint) const
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
void MIRROR(T &aPoint, const T &aMirrorRef)
Updates aPoint with the mirror of aPoint relative to the aMirrorRef.
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
void SetLayer(SCH_LAYER_ID aLayer)
Set the layer this item is on.
void Rotate(const wxPoint &aCenter) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
void GRLine(EDA_RECT *ClipBox, wxDC *DC, int x1, int y1, int x2, int y2, int width, const COLOR4D &Color, wxPenStyle aStyle)
wxDC * GetPrintDC() const
#define DEFAULT_NOCONNECT_SIZE
The default junction diameter in mils. (can be changed in preference menu)
virtual void SetColor(const COLOR4D &color)=0
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void MoveTo(const wxPoint &pos)
Base plotter engine class.
RENDER_SETTINGS * RenderSettings()
BITMAPS
A list of all bitmap identifiers.
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
Handle the component boundary box.
A base class for most all the KiCad significant classes used in schematics and boards.
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the layers the item is drawn on (which may be more than its "home" layer)
bool Intersects(const EDA_RECT &aRect) const
Test for a common area between rectangles.
int GetDefaultPenWidth() const
Helper class used to store the state of schematic items that can be connected to other schematic item...
void Plot(PLOTTER *aPlotter) const override
Plot the schematic item to aPlotter.
BITMAPS 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.
Base class for any item which can be embedded within the SCHEMATIC container class,...
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.
void Print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset) override
Print a schematic item.
bool doIsConnected(const wxPoint &aPosition) const override
Provide the object specific test to see if it is connected to aPosition.
EDA_RECT & Inflate(wxCoord dx, wxCoord dy)
Inflate the rectangle horizontally by dx and vertically by dy.
int m_size
Size of the no connect object.
KICAD_T Type() const
Returns the type of object.
A color representation with 4 components: red, green, blue, alpha.