61 wxT(
"Cannot swap junction data with invalid item." ) );
64 std::swap(
m_pos, item->m_pos );
66 std::swap(
m_color, item->m_color );
94 diameter = std::max( diameter,
KiROUND( netclass->GetWireWidth() * 1.7 ) );
117 if(
color == COLOR4D::UNSPECIFIED )
147 aItemList.push_back( item );
158 void SCH_JUNCTION::Show(
int nestLevel, std::ostream& os )
const 163 NestedSpace( nestLevel, os ) <<
'<' << s.Lower().mb_str() <<
m_pos <<
", " <<
m_diameter 171 if(
m_color != COLOR4D::UNSPECIFIED )
177 return netclass->GetSchematicColor();
179 return COLOR4D::UNSPECIFIED;
213 return selRect.
Collide( &junction, aAccuracy );
220 return m_pos == aPosition;
226 auto* settings = static_cast<KIGFX::SCH_RENDER_SETTINGS*>( aPlotter->
RenderSettings() );
229 if(
color == COLOR4D::UNSPECIFIED )
252 auto junction = static_cast<const SCH_JUNCTION*>( &aItem );
255 return GetPosition().x < junction->GetPosition().x;
258 return GetPosition().y < junction->GetPosition().y;
263 return GetColor() < junction->GetColor();
wxString GetClass() const override
Return the class name.
bool Collide(const SHAPE *aShape, int aClearance, VECTOR2I *aMTV) const override
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance,...
COLOR4D GetJunctionColor() const
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.
virtual void SetColor(COLOR4D color)=0
SCHEMATIC_SETTINGS & Settings() const
SCHEMATIC * Schematic() const
Searches the item hierarchy to find a SCHEMATIC.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
void Rotate(wxPoint aPosition) override
Rotate the item around aPosition 90 degrees in the clockwise direction.
void SetOrigin(const wxPoint &pos)
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
std::vector< wxPoint > GetConnectionPoints() const override
Add all the connection points for this item to aPoints.
#define DEFAULT_JUNCTION_DIAM
The default bus and wire enty size in mils.
const VECTOR2I GetCenter() const
void RotatePoint(int *pX, int *pY, double angle)
virtual bool operator<(const SCH_ITEM &aItem) const override
void GRFilledCircle(EDA_RECT *ClipBox, wxDC *DC, int x, int y, int r, int width, COLOR4D Color, COLOR4D BgColor)
bool Contains(const wxPoint &aPoint) const
bool doIsConnected(const wxPoint &aPosition) const override
Provide the object specific test to see if it is connected to aPosition.
void MIRROR(T &aPoint, const T &aMirrorRef)
Updates aPoint with the mirror of aPoint relative to the aMirrorRef.
SCH_JUNCTION(const wxPoint &aPosition=wxPoint(0, 0), int aDiameter=0, SCH_LAYER_ID aLayer=LAYER_JUNCTION)
NETCLASSPTR NetClass(const SCH_SHEET_PATH *aSheet=nullptr) const
bool Collide(const SEG &aSeg, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if the boundary of shape (this) lies closer to the segment aSeg than aClearance,...
wxPoint GetPosition() const override
const wxPoint GetPosition() const
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 MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
wxDC * GetPrintDC() const
SCH_LAYER_ID
Eeschema drawing layers.
#define STRUCT_DELETED
flag indication structures to be erased
virtual void Circle(const wxPoint &pos, int diametre, FILL_TYPE fill, int width=USE_DEFAULT_LINE_WIDTH)=0
const BITMAP_OPAQUE add_junction_xpm[1]
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_LAYER_ID GetLayer() const
Return the layer this item is on.
void GetEndPoints(std::vector< DANGLING_END_ITEM > &aItemList) override
Add the schematic item end points to aItemList if the item has end points.
void Print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset) override
Print a schematic item.
Base plotter engine class.
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
RENDER_SETTINGS * RenderSettings()
BITMAP_DEF GetMenuImage() const override
Return a pointer to an image to be used in menus.
Handle the component boundary box.
SHAPE_CIRCLE getEffectiveShape() const
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
A base class for most all the KiCad significant classes used in schematics and boards.
Helper class used to store the state of schematic items that can be connected to other schematic item...
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
#define SKIP_STRUCT
flag indicating that the structure should be ignored
Base class for any item which can be embedded within the SCHEMATIC container class,...
void Plot(PLOTTER *aPlotter) override
Plot the schematic item to aPlotter.
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.