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;
151 wxPoint dist = aPosition -
m_pos;
153 if( ( std::abs( dist.x ) <= delta ) && ( std::abs( dist.y ) <= delta ) )
182 aPlotter->
MoveTo( wxPoint( pX - delta, pY - delta ) );
183 aPlotter->
FinishTo( wxPoint( pX + delta, pY + delta ) );
184 aPlotter->
MoveTo( wxPoint( pX + delta, pY - delta ) );
185 aPlotter->
FinishTo( wxPoint( pX - delta, pY + 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
PNG memory record (file in memory).
BITMAP_DEF GetMenuImage() const override
Return a pointer to an image to be used in menus.
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.
virtual void SetColor(COLOR4D color)=0
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 contained within or on the bounding box of an item.
const BITMAP_OPAQUE noconn_xpm[1]
void SetLayer(SCH_LAYER_ID aLayer)
Set the layer this item is on.
wxDC * GetPrintDC() const
#define DEFAULT_NOCONNECT_SIZE
The default junction diameter in mils. (can be changed in preference menu)
void GRLine(EDA_RECT *ClipBox, wxDC *DC, int x1, int y1, int x2, int y2, int width, COLOR4D Color, wxPenStyle aStyle)
void Plot(PLOTTER *aPlotter) override
Plot the schematic item to aPlotter.
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()
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.
void Rotate(wxPoint aPosition) override
Rotate the item around aPosition 90 degrees in the clockwise direction.
int GetDefaultPenWidth() const
int GetMinPenWidth() const
Helper class used to store the state of schematic items that can be connected to other schematic item...
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,...
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.
virtual void SetCurrentLineWidth(int width, void *aData=NULL)=0
Set the line width for the next drawing.
A color representation with 4 components: red, green, blue, alpha.