54    std::unique_ptr<SCH_RULE_AREA> ruleArea = std::make_unique<SCH_RULE_AREA>();
 
 
   69    commit.
Push( 
_( 
"Draw Rule Area" ) );
 
 
  124    if( finalPoints.PointCount() < 3 )
 
  134        auto& outline = ruleShape.
Outline( 0 );
 
  136        for( 
int i = 0; i < finalPoints.PointCount(); ++i )
 
  137            outline.
Append( finalPoints.CPoint( i ) );
 
  144            for( 
int i = 1; i < leaderPts.
PointCount(); i++ )
 
  148            for( 
int i = 1; i < loopPts.
PointCount() - 1; i++ )
 
  152        outline.SetClosed( 
true );
 
  153        outline.Simplify( 
true );
 
  157        if( outline.PointCount() >= 3 )
 
  159            SEG seg( outline.CLastPoint(), outline.CPoint( 1 ) );
 
 
static TOOL_ACTION selectItem
Select an item (specified as the event parameter).
 
static TOOL_ACTION selectionClear
Clear the current selection.
 
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
 
Color settings are a bit different than most of the settings objects in that there can be more than o...
 
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Add a new item to the model.
 
A base class for most all the KiCad significant classes used in schematics and boards.
 
A color representation with 4 components: red, green, blue, alpha.
 
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
 
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
 
Class that handles the drawing of a polygon, including management of last corner deletion and drawing...
 
const SHAPE_LINE_CHAIN & GetLockedInPoints() const
Get the "locked-in" points that describe the polygon itself.
 
LEADER_MODE GetLeaderMode() const
 
void SetLeaderMode(LEADER_MODE aMode)
Set the leader mode to use when calculating the leader/returner lines.
 
bool IsPolygonInProgress() const
 
const SHAPE_LINE_CHAIN & GetLoopLinePoints() const
Get the points from the current cursor position to the polygon start point.
 
const SHAPE_LINE_CHAIN & GetLeaderLinePoints() const
Get the points comprising the leader line (the line from the last locked-in point to the current curs...
 
std::unique_ptr< SCH_RULE_AREA > createNewRuleArea()
Create a new SCH_RULE_AREA.
 
RULE_AREA_CREATE_HELPER(KIGFX::VIEW &aView, SCH_EDIT_FRAME *aFrame, TOOL_MANAGER *aMgr)
 
std::unique_ptr< SCH_RULE_AREA > m_rule_area
The TOOL_MANAGER running the tool.
 
void OnGeometryChange(const POLYGON_GEOM_MANAGER &aMgr) override
Called when the polygon is complete.
 
void OnComplete(const POLYGON_GEOM_MANAGER &aMgr) override
 
virtual ~RULE_AREA_CREATE_HELPER()
 
KIGFX::VIEW & m_parentView
The active schematic edit frame.
 
bool OnFirstPoint(POLYGON_GEOM_MANAGER &aMgr) override
Called before the first point is added - clients can do initialization here, and can veto the start o...
 
void commitRuleArea(std::unique_ptr< SCH_RULE_AREA > aRuleArea)
Commit the current rule area in progress to the schematic.
 
TOOL_MANAGER * m_toolManager
 
KIGFX::PREVIEW::POLYGON_ITEM m_previewItem
< The preview item to display
 
SCH_EDIT_FRAME * m_frame
The rule area in progress.
 
virtual void Push(const wxString &aMessage=wxT("A commit"), int aCommitFlags=0) override
Execute the changes.
 
Schematic editor (Eeschema) main window.
 
void LoadColors(const COLOR_SETTINGS *aSettings) override
 
int LineDistance(const VECTOR2I &aP, bool aDetermineSide=false) const
Return the closest Euclidean distance between point aP and the line defined by the ends of segment (t...
 
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
 
int PointCount() const
Return the number of points (vertices) in this line chain.
 
void Append(int aX, int aY, bool aAllowDuplication=false)
Append a new point at the end of the line chain.
 
const VECTOR2I & CPoint(int aIndex) const
Return a reference to a given point in the line chain.
 
Represent a set of closed polygons.
 
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
 
int NewOutline()
Creates a new empty polygon in the set and returns its index.
 
@ GEOMETRY
Position or shape has changed.