KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_rule_area.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#include <algorithm>
21#include <iterator>
22#include <map>
23#include <vector>
24
25#include <eda_draw_frame.h>
26#include <erc/erc_item.h>
27#include <erc/erc_settings.h>
30#include <sch_line.h>
31#include <sch_marker.h>
32#include <sch_rtree.h>
33#include <sch_rule_area.h>
34#include <sch_screen.h>
35#include <sch_sheet_path.h>
36#include <geometry/shape_rect.h>
37#include <properties/property.h>
39
40
42{
43 // Break bidirectional references so that items destroyed after this rule area
44 // don't try to call RemoveItem() on freed memory.
45 for( SCH_ITEM* item : m_items )
46 item->RemoveRuleAreaFromCache( this );
47
48 for( SCH_DIRECTIVE_LABEL* label : m_directives )
49 label->RemoveConnectedRuleArea( this );
50}
51
52
54{
55 return wxT( "SCH_RULE_AREA" );
56}
57
58
60{
61 return _( "Rule Area" );
62}
63
64
66{
67 return new SCH_RULE_AREA( *this );
68}
69
70
75
76
77std::vector<SHAPE*> SCH_RULE_AREA::MakeEffectiveShapes( bool aEdgeOnly ) const
78{
79 std::vector<SHAPE*> effectiveShapes;
80 int width = GetEffectiveWidth();
81
82 switch( m_shape )
83 {
84 case SHAPE_T::POLY:
85 if( GetPolyShape().OutlineCount() == 0 ) // malformed/empty polygon
86 break;
87
88 for( int ii = 0; ii < GetPolyShape().OutlineCount(); ++ii )
89 {
90 const SHAPE_LINE_CHAIN& l = GetPolyShape().COutline( ii );
91
92 if( IsSolidFill() && !aEdgeOnly )
93 effectiveShapes.emplace_back( new SHAPE_SIMPLE( l ) );
94
95 if( width > 0 || !IsSolidFill() || aEdgeOnly )
96 {
97 int segCount = l.SegmentCount();
98
99 for( int jj = 0; jj < segCount; jj++ )
100 effectiveShapes.emplace_back( new SHAPE_SEGMENT( l.CSegment( jj ), width ) );
101 }
102 }
103
104 break;
105
106 default:
107 return SCH_SHAPE::MakeEffectiveShapes( aEdgeOnly );
108 }
109
110 return effectiveShapes;
111}
112
113
114void SCH_RULE_AREA::Plot( PLOTTER* aPlotter, bool aBackground, const SCH_PLOT_OPTS& aPlotOpts,
115 int aUnit, int aBodyStyle, const VECTOR2I& aOffset, bool aDimmed )
116{
117 if( IsPrivate() )
118 return;
119
120 SCH_RENDER_SETTINGS* renderSettings = getRenderSettings( aPlotter );
121 int pen_size = GetEffectivePenWidth( renderSettings );
122
123 if( GetShape() != SHAPE_T::POLY )
124 SCH_SHAPE::Plot( aPlotter, aBackground, aPlotOpts, aUnit, aBodyStyle, aOffset, aDimmed );
125
126 static std::vector<VECTOR2I> ptList;
127
128 ptList.clear();
129
130 const std::vector<VECTOR2I>& polyPoints = GetPolyShape().Outline( 0 ).CPoints();
131
132 for( const VECTOR2I& pt : polyPoints )
133 ptList.push_back( pt );
134
135 ptList.push_back( polyPoints[0] );
136
137 COLOR4D color = GetStroke().GetColor();
138 COLOR4D bg = renderSettings->GetBackgroundColor();
139 LINE_STYLE lineStyle = GetStroke().GetLineStyle();
140 FILL_T fill = m_fill;
141
142 if( aBackground )
143 {
144 if( !aPlotter->GetColorMode() )
145 return;
146
147 switch( m_fill )
148 {
150 return;
151
153 color = GetFillColor();
154 break;
155
157 color = renderSettings->GetLayerColor( LAYER_DEVICE_BACKGROUND );
158 break;
159
160 default:
161 return;
162 }
163
164 pen_size = 0;
165 lineStyle = LINE_STYLE::SOLID;
166 }
167 else /* if( aForeground ) */
168 {
169 if( !aPlotter->GetColorMode() || color == COLOR4D::UNSPECIFIED )
170 color = renderSettings->GetLayerColor( m_layer );
171
172 if( lineStyle == LINE_STYLE::DEFAULT )
173 lineStyle = LINE_STYLE::SOLID;
174
176 fill = m_fill;
177 else
178 fill = FILL_T::NO_FILL;
179
180 pen_size = GetEffectivePenWidth( renderSettings );
181 }
182
183 if( bg == COLOR4D::UNSPECIFIED || !aPlotter->GetColorMode() )
184 bg = COLOR4D::WHITE;
185
186 if( color.m_text && Schematic() )
187 color = COLOR4D( ResolveText( *color.m_text, &Schematic()->CurrentSheet() ) );
188
189 if( aDimmed )
190 {
191 color.Desaturate();
192 color = color.Mix( bg, 0.5f );
193 }
194
195 aPlotter->SetColor( color );
196 aPlotter->SetCurrentLineWidth( pen_size );
197 aPlotter->SetDash( pen_size, lineStyle );
198
199 aPlotter->PlotPoly( ptList, fill, pen_size, nullptr );
200
201 aPlotter->SetDash( pen_size, LINE_STYLE::SOLID );
202}
203
204
205wxString SCH_RULE_AREA::GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const
206{
207 return _( "Schematic rule area" );
208}
209
210
212{
213 // Save the current state
216
217 // Reset the rule area
218 // Do NOT assume these pointers are valid.
219 m_items.clear();
220 m_itemIDs.clear();
221 m_directives.clear();
222 m_directiveIDs.clear();
223}
224
225
227{
228 EE_RTREE& items = screen->Items();
230
231 // Get any SCH_DIRECTIVE_LABELs which are attached to the rule area border
232 std::unordered_set<SCH_DIRECTIVE_LABEL*> attachedDirectives;
233 EE_RTREE::EE_TYPE candidateDirectives = items.Overlapping( SCH_DIRECTIVE_LABEL_T, boundingBox );
234
235 for( SCH_ITEM* candidateDirective : candidateDirectives )
236 {
237 SCH_DIRECTIVE_LABEL* label = static_cast<SCH_DIRECTIVE_LABEL*>( candidateDirective );
238 const std::vector<VECTOR2I> labelConnectionPoints = label->GetConnectionPoints();
239 assert( labelConnectionPoints.size() == 1 );
240
241 if( GetPolyShape().CollideEdge( labelConnectionPoints[0], nullptr, 5 ) )
242 addDirective( label );
243 }
244
245 // Next find any connectable items which lie within the rule area
246 EE_RTREE::EE_TYPE ruleAreaItems = items.Overlapping( boundingBox );
247
248 for( SCH_ITEM* areaItem : ruleAreaItems )
249 {
250 if( areaItem->IsType( { SCH_ITEM_LOCATE_WIRE_T, SCH_ITEM_LOCATE_BUS_T } ) )
251 {
252 SCH_LINE* lineItem = static_cast<SCH_LINE*>( areaItem );
253 SHAPE_SEGMENT lineSeg( lineItem->GetStartPoint(), lineItem->GetEndPoint(),
254 lineItem->GetLineWidth() );
255
256 if( GetPolyShape().Collide( &lineSeg ) )
257 addContainedItem( areaItem );
258 }
259 else if( areaItem->IsType( { SCH_PIN_T, SCH_LABEL_T, SCH_GLOBAL_LABEL_T, SCH_HIER_LABEL_T } ) )
260 {
261 std::vector<VECTOR2I> connectionPoints = areaItem->GetConnectionPoints();
262 wxASSERT( connectionPoints.size() == 1 );
263
264 if( GetPolyShape().Collide( connectionPoints[0] ) )
265 addContainedItem( areaItem );
266 }
267 else if( areaItem->IsType( { SCH_SYMBOL_T } ) )
268 {
269 SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( areaItem );
270 const BOX2I symbolBb = symbol->GetBoundingBox();
271 const SHAPE_RECT rect( symbolBb );
272
273 if( GetPolyShape().Collide( &rect ) )
274 {
275 addContainedItem( areaItem );
276
277 // Add child pins which are within the rule area
278 for( SCH_PIN* pin : symbol->GetPins() )
279 {
280 if( GetPolyShape().Collide( pin->GetPosition() ) )
282 }
283 }
284 }
285 else if( areaItem->IsType( { SCH_SHEET_T } ) )
286 {
287 const BOX2I sheetBb = areaItem->GetBoundingBox();
288 const SHAPE_RECT rect( sheetBb );
289
290 if( GetPolyShape().Collide( &rect ) )
291 {
292 addContainedItem( areaItem );
293 }
294 }
295 }
296}
297
298
299std::vector<std::pair<SCH_RULE_AREA*, SCH_SCREEN*>>
300SCH_RULE_AREA::UpdateRuleAreasInScreens( std::unordered_set<SCH_SCREEN*>& screens, KIGFX::SCH_VIEW* view )
301{
302 std::vector<std::pair<SCH_RULE_AREA*, SCH_SCREEN*>> forceUpdateRuleAreas;
303
304 for( SCH_SCREEN* screen : screens )
305 {
306 // First reset all item caches - must be done first to ensure two rule areas
307 // on the same item don't overwrite each other's caches
308 for( SCH_ITEM* item : screen->Items() )
309 {
310 if( item->Type() == SCH_RULE_AREA_T )
311 static_cast<SCH_RULE_AREA*>( item )->resetCaches();
312
313 if( item->Type() == SCH_DIRECTIVE_LABEL_T && view )
314 view->Update( item, KIGFX::REPAINT );
315
316 item->ClearRuleAreasCache();
317 }
318
319 // Secondly refresh the contained items
320 for( SCH_ITEM* ruleAreaAsItem : screen->Items().OfType( SCH_RULE_AREA_T ) )
321 {
322 SCH_RULE_AREA* ruleArea = static_cast<SCH_RULE_AREA*>( ruleAreaAsItem );
323
324 ruleArea->RefreshContainedItemsAndDirectives( screen );
325
326 if( ruleArea->m_directiveIDs != ruleArea->m_prev_directives )
327 forceUpdateRuleAreas.push_back( { ruleArea, screen } );
328 }
329 }
330
331 return forceUpdateRuleAreas;
332}
333
334
335const std::unordered_set<SCH_ITEM*>& SCH_RULE_AREA::GetContainedItems() const
336{
337 return m_items;
338}
339
340
341const std::unordered_set<SCH_DIRECTIVE_LABEL*>& SCH_RULE_AREA::GetDirectives() const
342{
343 return m_directives;
344}
345
346
347const std::unordered_set<KIID>& SCH_RULE_AREA::GetPastContainedItems() const
348{
349 return m_prev_items;
350}
351
352
353const std::vector<std::pair<wxString, SCH_ITEM*>>
355{
356 std::vector<std::pair<wxString, SCH_ITEM*>> resolvedNetclasses;
357
358 for( SCH_DIRECTIVE_LABEL* directive : m_directives )
359 {
360 directive->RunOnChildren(
361 [&]( SCH_ITEM* aChild )
362 {
363 if( aChild->Type() == SCH_FIELD_T )
364 {
365 SCH_FIELD* field = static_cast<SCH_FIELD*>( aChild );
366
367 if( field->GetCanonicalName() == wxT( "Netclass" ) )
368 {
369 wxString netclass = field->GetShownText( aSheetPath, false );
370
371 if( netclass != wxEmptyString )
372 resolvedNetclasses.push_back( { netclass, directive } );
373 }
374 }
375
376 return true;
377 },
379 }
380
381 return resolvedNetclasses;
382}
383
384
385void SCH_RULE_AREA::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
386{
387 aList.emplace_back( _( "Rule Area" ), wxEmptyString );
388
389 wxString msg;
390 msg.Printf( wxS( "%d" ), GetPolyShape().Outline( 0 ).PointCount() );
391 aList.emplace_back( _( "Points" ), msg );
392
393 m_stroke.GetMsgPanelInfo( aFrame, aList );
394
395 const std::vector<std::pair<wxString, SCH_ITEM*>> netclasses = SCH_RULE_AREA::GetResolvedNetclasses( nullptr );
396 wxString resolvedNetclass = _( "<None>" );
397
398 if( netclasses.size() > 0 )
399 resolvedNetclass = netclasses[0].first;
400
401 aList.emplace_back( _( "Resolved netclass" ), resolvedNetclass );
402}
403
404
406{
407 label->AddConnectedRuleArea( this );
408 m_directives.insert( label );
409 m_directiveIDs.insert( label->m_Uuid );
410}
411
412
414{
415 item->AddRuleAreaToCache( this );
416 m_items.insert( item );
417 m_itemIDs.insert( item->m_Uuid );
418}
419
420
422{
423 m_items.erase( aItem );
424 m_prev_items.erase( aItem->m_Uuid );
425}
426
427
429{
430 m_directives.erase( aLabel );
431 m_prev_directives.erase( aLabel->m_Uuid );
432}
433
434
436{
438 {
447
448 const wxString groupAttributes = _HKI( "Attributes" );
449
450 propMgr.AddProperty( new PROPERTY<SCH_RULE_AREA, bool>( _HKI( "Exclude From Board" ),
453 groupAttributes );
454
455 propMgr.AddProperty( new PROPERTY<SCH_RULE_AREA, bool>( _HKI( "Exclude From Simulation" ),
458 groupAttributes );
459
460 propMgr.AddProperty( new PROPERTY<SCH_RULE_AREA, bool>( _HKI( "Exclude From Bill of Materials" ),
463 groupAttributes );
464
465 propMgr.AddProperty( new PROPERTY<SCH_RULE_AREA, bool>( _HKI( "Do not Populate" ), &SCH_RULE_AREA::SetDNPProp,
467 groupAttributes );
468 }
BOX2< VECTOR2I > BOX2I
Definition box2.h:918
static const COLOR4D WHITE
Definition color4d.h:401
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
Definition color4d.h:398
The base class for create windows for drawing purpose.
const KIID m_Uuid
Definition eda_item.h:531
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:108
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType, bool isSCH_ITEM=false, bool isBOARD_ITEM=false)
Definition eda_item.cpp:37
SHAPE_T m_shape
Definition eda_shape.h:592
SHAPE_POLY_SET & GetPolyShape()
SHAPE_T GetShape() const
Definition eda_shape.h:185
bool IsSolidFill() const
Definition eda_shape.h:133
COLOR4D GetFillColor() const
Definition eda_shape.h:169
STROKE_PARAMS m_stroke
Definition eda_shape.h:593
FILL_T m_fill
Definition eda_shape.h:594
Implement an R-tree for fast spatial and type indexing of schematic items.
Definition sch_rtree.h:34
EE_TYPE Overlapping(const BOX2I &aRect) const
Definition sch_rtree.h:226
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:101
std::shared_ptr< wxString > m_text
Definition color4d.h:395
COLOR4D & Desaturate()
Removes color (in HSL model)
Definition color4d.cpp:528
COLOR4D Mix(const COLOR4D &aColor, double aFactor) const
Return a color that is mixed with the input by a factor.
Definition color4d.h:292
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
void Update(const KIGFX::VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
Definition sch_view.cpp:73
Base plotter engine class.
Definition plotter.h:133
virtual void SetDash(int aLineWidth, LINE_STYLE aLineStyle)=0
bool GetColorMode() const
Definition plotter.h:161
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.
virtual void PlotPoly(const std::vector< VECTOR2I > &aCornerList, FILL_T aFill, int aWidth, void *aData)=0
Draw a polygon ( filled or not ).
virtual void SetColor(const COLOR4D &color)=0
Provide class metadata.Helper macro to map type hashes to names.
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
static PROPERTY_MANAGER & Instance()
PROPERTY_BASE & AddProperty(PROPERTY_BASE *aProperty, const wxString &aGroup=wxEmptyString)
Register a property.
void AddTypeCast(TYPE_CAST_BASE *aCast)
Register a type converter.
void AddConnectedRuleArea(SCH_RULE_AREA *aRuleArea)
Adds an entry to the connected rule area cache.
wxString GetCanonicalName() const
Get a non-language-specific name for a field which can be used for storage, variable look-up,...
wxString GetShownText(const SCH_SHEET_PATH *aPath, bool aAllowExtraText, int aDepth=0, const wxString &aVariantName=wxEmptyString) const
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition sch_item.h:162
SCH_RENDER_SETTINGS * getRenderSettings(PLOTTER *aPlotter) const
Definition sch_item.h:724
SCHEMATIC * Schematic() const
Search the item hierarchy to find a SCHEMATIC.
Definition sch_item.cpp:268
bool IsPrivate() const
Definition sch_item.h:248
void AddRuleAreaToCache(SCH_RULE_AREA *aRuleArea)
Add a rule area to the item's cache.
Definition sch_item.h:671
SCH_ITEM(EDA_ITEM *aParent, KICAD_T aType, int aUnit=0, int aBodyStyle=0)
Definition sch_item.cpp:52
wxString ResolveText(const wxString &aText, const SCH_SHEET_PATH *aPath, int aDepth=0) const
Definition sch_item.cpp:377
int GetEffectivePenWidth(const SCH_RENDER_SETTINGS *aSettings) const
Definition sch_item.cpp:790
SCH_LAYER_ID m_layer
Definition sch_item.h:775
std::vector< VECTOR2I > GetConnectionPoints() const override
Add all the connection points for this item to aPoints.
Segment description base class to describe items which have 2 end points (track, wire,...
Definition sch_line.h:38
VECTOR2I GetEndPoint() const
Definition sch_line.h:144
VECTOR2I GetStartPoint() const
Definition sch_line.h:135
int GetLineWidth() const
Definition sch_line.h:194
const KIGFX::COLOR4D & GetBackgroundColor() const override
Return current background color settings.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
std::unordered_set< KIID > m_directiveIDs
virtual std::vector< SHAPE * > MakeEffectiveShapes(bool aEdgeOnly=false) const override
Make a set of SHAPE objects representing the EDA_SHAPE.
const std::unordered_set< SCH_ITEM * > & GetContainedItems() const
Return a set of all items contained within the rule area.
void addContainedItem(SCH_ITEM *item)
Add an item to the list of items which this rule area affects.
std::unordered_set< KIID > m_prev_items
All SCH_ITEM objectss contained or intersecting the rule area in the previous update.
std::unordered_set< KIID > m_prev_directives
All SCH_DIRECTIVE_LABEL objects attached to the rule area border in the previous update.
void RefreshContainedItemsAndDirectives(SCH_SCREEN *screen)
Refresh the list of items which this rule area affects.
void SetExcludedFromBOMProp(bool aExcludeFromBOM)
void resetCaches()
Reset all item and directive caches, saving the current state first.
const std::unordered_set< SCH_DIRECTIVE_LABEL * > & GetDirectives() const
Return the set of all directive labels attached to the rule area border.
void addDirective(SCH_DIRECTIVE_LABEL *label)
Add a directive label which applies to items within ths rule area.
std::vector< int > ViewGetLayers() const override
Return the layers the item is drawn on (which may be more than its "home" layer)
bool GetExcludedFromBoardProp() const
void SetExcludedFromSimProp(bool aExcludeFromSim)
wxString GetFriendlyName() const override
virtual 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.
std::unordered_set< SCH_DIRECTIVE_LABEL * > m_directives
All SCH_DIRECTIVE_LABEL objects attached to the rule area border. No ownership.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
bool GetExcludedFromSimProp() const
const std::vector< std::pair< wxString, SCH_ITEM * > > GetResolvedNetclasses(const SCH_SHEET_PATH *aSheetPath) const
Resolve the netclass of this rule area from connected directive labels.
static std::vector< std::pair< SCH_RULE_AREA *, SCH_SCREEN * > > UpdateRuleAreasInScreens(std::unordered_set< SCH_SCREEN * > &screens, KIGFX::SCH_VIEW *view)
Update all rule area connectvity / caches in the given sheet paths.
virtual ~SCH_RULE_AREA()
std::unordered_set< SCH_ITEM * > m_items
All SCH_ITEM objects currently contained or intersecting the rule area. No ownership.
const std::unordered_set< KIID > & GetPastContainedItems() const
void SetExcludedFromBoardProp(bool aExclude)
std::unordered_set< KIID > m_itemIDs
void RemoveDirective(SCH_DIRECTIVE_LABEL *aLabel)
Remove a directive label from this rule area's caches (called when the label is deleted).
bool GetExcludedFromBOMProp() const
bool GetDNPProp() const
wxString GetClass() const override
Return the class name.
void RemoveItem(SCH_ITEM *aItem)
Remove an item from this rule area's caches (called when the item is deleted).
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Get the message panel info for the rule area.
void SetDNPProp(bool aDNP)
EE_RTREE & Items()
Get the full RTree, usually for iterating.
Definition sch_screen.h:115
std::vector< SHAPE * > MakeEffectiveShapes(bool aEdgeOnly=false) const override
Make a set of SHAPE objects representing the SCH_SHAPE.
Definition sch_shape.h:116
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.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
STROKE_PARAMS GetStroke() const override
Definition sch_shape.h:57
int GetEffectiveWidth() const override
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Schematic symbol object.
Definition sch_symbol.h:69
std::vector< const SCH_PIN * > GetPins(const SCH_SHEET_PATH *aSheet) const
Retrieve a list of the SCH_PINs for the given sheet path.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
int SegmentCount() const
Return the number of segments in this line chain.
const SEG CSegment(int aIndex) const
Return a constant copy of the aIndex segment in the line chain.
const std::vector< VECTOR2I > & CPoints() const
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
int OutlineCount() const
Return the number of outlines in the set.
const SHAPE_LINE_CHAIN & COutline(int aIndex) const
Represent a simple polygon consisting of a zero-thickness closed chain of connected line segments.
LINE_STYLE GetLineStyle() const
KIGFX::COLOR4D GetColor() const
#define _(s)
@ NO_RECURSE
Definition eda_item.h:50
FILL_T
Definition eda_shape.h:59
@ FILLED_WITH_COLOR
Definition eda_shape.h:63
@ NO_FILL
Definition eda_shape.h:60
@ FILLED_WITH_BG_BODYCOLOR
Definition eda_shape.h:62
@ FILLED_SHAPE
Fill with object color.
Definition eda_shape.h:61
@ LAYER_RULE_AREAS
Definition layer_ids.h:463
@ LAYER_DEVICE_BACKGROUND
Definition layer_ids.h:482
@ LAYER_NOTES_BACKGROUND
Definition layer_ids.h:467
@ LAYER_SELECTION_SHADOWS
Definition layer_ids.h:493
@ REPAINT
Item needs to be redrawn.
Definition view_item.h:54
#define _HKI(x)
Definition page_info.cpp:40
#define TYPE_HASH(x)
Definition property.h:74
#define REGISTER_TYPE(x)
static struct SCH_RULE_AREA_DESC _SCH_RULE_AREA_DESC
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
static bool Collide(const SHAPE_CIRCLE &aA, const SHAPE_CIRCLE &aB, int aClearance, int *aActual, VECTOR2I *aLocation, VECTOR2I *aMTV)
BOX2I boundingBox(T aObject, int aLayer)
Used by SHAPE_INDEX to get the bounding box of a generic T object.
Definition shape_index.h:58
LINE_STYLE
Dashed line types.
The EE_TYPE struct provides a type-specific auto-range iterator to the RTree.
Definition sch_rtree.h:171
KIBIS_PIN * pin
@ SCH_FIELD_T
Definition typeinfo.h:147
@ SCH_DIRECTIVE_LABEL_T
Definition typeinfo.h:168
@ SCH_RULE_AREA_T
Definition typeinfo.h:167
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683