33class NETLIST_OBJECT_LIST;
55 void Serialize( google::protobuf::Any &aContainer )
const override;
56 bool Deserialize(
const google::protobuf::Any &aContainer )
override;
65 return wxT(
"SCH_LINE" );
70 bool IsType(
const std::vector<KICAD_T>& aScanTypes )
const override
75 for(
KICAD_T scanType : aScanTypes )
175 void SetLineColor(
const double r,
const double g,
const double b,
const double a );
198 return style_a == style_b
199 || ( style_a == LINE_STYLE::DEFAULT && style_b == LINE_STYLE::SOLID )
200 || ( style_a == LINE_STYLE::SOLID && style_b == LINE_STYLE::DEFAULT );
255 void GetEndPoints( std::vector<DANGLING_END_ITEM>& aItemList )
override;
258 std::vector<DANGLING_END_ITEM>& aItemListByPos,
294 bool HitTest(
const VECTOR2I& aPosition,
int aAccuracy = 0 )
const override;
295 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
298 const VECTOR2I& aOffset,
bool aForceNoFill,
bool aDimmed )
override;
301 const VECTOR2I& aOffset,
bool aDimmed )
override {}
304 int aUnit,
int aBodyStyle,
const VECTOR2I& aOffset,
bool aDimmed )
override;
316 void Show(
int nestLevel, std::ostream& os )
const override;
BITMAPS
A list of all bitmap identifiers.
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
A color representation with 4 components: red, green, blue, alpha.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Base plotter engine class.
Base class for any item which can be embedded within the SCHEMATIC container class,...
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
Segment description base class to describe items which have 2 end points (track, wire,...
int GetPenWidth() const override
bool doIsConnected(const VECTOR2I &aPosition) const override
Provide the object specific test to see if it is connected to aPosition.
void GetEndPoints(std::vector< DANGLING_END_ITEM > &aItemList) override
Add the schematic item end points to aItemList if the item has end points.
void SetStartPoint(const VECTOR2I &aPosition)
void PrintBackground(const SCH_RENDER_SETTINGS *aSettings, int aUnit, int aBodyStyle, const VECTOR2I &aOffset, bool aDimmed) override
Print just the background fills.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
bool UpdateDanglingState(std::vector< DANGLING_END_ITEM > &aItemListByType, std::vector< DANGLING_END_ITEM > &aItemListByPos, const SCH_SHEET_PATH *aPath=nullptr) override
Test the schematic item to aItemList to check if it's dangling state has changed.
void SetOperatingPoint(const wxString &aText)
bool m_startIsDangling
True if start point is not connected.
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
bool IsPointClickableAnchor(const VECTOR2I &aPos) const override
void SetPosition(const VECTOR2I &aPosition) override
void StoreAngle()
Saves the current line angle.
std::vector< VECTOR2I > GetConnectionPoints() const override
Add all the connection points for this item to aPoints.
int GetReverseAngleFrom(const VECTOR2I &aPoint) const
double ViewGetLOD(int aLayer, KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
virtual bool HasLineStroke() const override
Check if this schematic item has line stoke properties.
bool IsWire() const
Return true if the line is a wire.
bool IsStartDangling() const
SCH_LINE(const VECTOR2D &pos, int layer=LAYER_NOTES)
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void SetLineColor(const COLOR4D &aColor)
bool CanConnect(const SCH_ITEM *aItem) const override
EDA_ANGLE GetStoredAngle() const
Returns the angle stored by StoreAngle()
bool IsParallel(const SCH_LINE *aLine) const
void SetLineWidth(const int aSize)
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
virtual STROKE_PARAMS GetStroke() const override
int GetAngleFrom(const VECTOR2I &aPoint) const
void GetSelectedPoints(std::vector< VECTOR2I > &aPoints) const
COLOR4D m_lastResolvedColor
LINE_STYLE GetEffectiveLineStyle() const
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.
EDA_ANGLE Angle() const
Gets the angle between the start and end lines.
void Plot(PLOTTER *aPlotter, bool aBackground, const SCH_PLOT_OPTS &aPlotOpts, int aUnit, int aBodyStyle, const VECTOR2I &aOffset, bool aDimmed) override
Plot the item to aPlotter.
wxString m_operatingPoint
wxString GetClass() const override
Return the class name.
static bool ClassOf(const EDA_ITEM *aItem)
void Rotate(const VECTOR2I &aCenter, bool aRotateCCW) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
VECTOR2I GetMidPoint() const
VECTOR2I GetEndPoint() const
VECTOR2I GetStartPoint() const
bool ConnectionPropagatesTo(const EDA_ITEM *aItem) const override
Return true if this item should propagate connection info to aItem.
LINE_STYLE m_lastResolvedLineStyle
VECTOR2I GetPosition() const override
SEG GetSeg() const
Get the geometric aspect of the wire as a SEG.
bool IsEndDangling() const
SCH_LINE * MergeOverlap(SCH_SCREEN *aScreen, SCH_LINE *aLine, bool aCheckJunctions)
Check line against aLine to see if it overlaps and merge if it does.
VECTOR2I m_start
Line start point.
bool IsBus() const
Return true if the line is a bus.
void Print(const SCH_RENDER_SETTINGS *aSettings, int aUnit, int aBodyStyle, const VECTOR2I &aOffset, bool aForceNoFill, bool aDimmed) override
Print an item.
void StoreAngle(const EDA_ANGLE &aAngle)
bool HasConnectivityChanges(const SCH_ITEM *aItem, const SCH_SHEET_PATH *aInstance=nullptr) const override
Check if aItem has connectivity changes against this object.
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
void SetLineStyle(const LINE_STYLE aStyle)
VECTOR2I m_end
Line end point.
void Move(const VECTOR2I &aMoveVector) override
Move the item by aMoveVector to a new position.
LINE_STYLE GetLineStyle() const
void MoveEnd(const VECTOR2I &aMoveVector)
VECTOR2I GetSortPosition() const override
Return the coordinates that should be used for sorting this element visually compared to other elemen...
STROKE_PARAMS m_stroke
Line stroke properties.
EDA_ANGLE m_storedAngle
Stored angle.
bool m_endIsDangling
True if end point is not connected.
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
bool IsConnectable() const override
wxString GetFriendlyName() const override
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
bool operator==(const SCH_ITEM &aOther) const override
bool operator<(const SCH_ITEM &aItem) const override
virtual void SetStroke(const STROKE_PARAMS &aStroke) override
bool IsEndPoint(const VECTOR2I &aPoint) const
bool IsStrokeEquivalent(const SCH_LINE *aLine)
void SetLastResolvedState(const SCH_ITEM *aItem) override
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
bool IsGraphicLine() const
Return if the line is a graphic (non electrical line)
static enum wxPenStyle PenStyle[]
COLOR4D GetLineColor() const
Returns COLOR4D::UNSPECIFIED if a custom color hasn't been set for this line.
std::vector< int > ViewGetLayers() const override
Return the layers the item is drawn on (which may be more than its "home" layer)
void MoveStart(const VECTOR2I &aMoveVector)
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
SCH_LINE * BreakAt(const VECTOR2I &aPoint)
Break this segment into two at the specified point.
bool IsOrthogonal() const
Checks if line is orthogonal (to the grid).
void SetEndPoint(const VECTOR2I &aPosition)
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
bool IsDangling() const override
const wxString & GetOperatingPoint() const
double Similarity(const SCH_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Simple container to manage line stroke parameters.
LINE_STYLE GetLineStyle() const
KIGFX::COLOR4D GetColor() const
LINE_STYLE
Dashed line types.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
@ SCH_ITEM_LOCATE_GRAPHIC_LINE_T
VECTOR2< int32_t > VECTOR2I