KiCad PCB EDA Suite
pcb_shape.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 (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <[email protected]>
6 * Copyright (C) 2011 Wayne Stambaugh <[email protected]>
7 * Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, you may find one here:
21 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22 * or you may search the http://www.gnu.org website for the version 2 license,
23 * or you may write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25 */
26
27#include <bitmaps.h>
28#include <core/mirror.h>
29#include <macros.h>
30#include <pcb_edit_frame.h>
32#include <footprint.h>
33#include <base_units.h>
35#include <pcb_shape.h>
36#include <pcb_painter.h>
37
38PCB_SHAPE::PCB_SHAPE( BOARD_ITEM* aParent, KICAD_T aItemType, SHAPE_T aShapeType ) :
39 BOARD_ITEM( aParent, aItemType ),
40 EDA_SHAPE( aShapeType, pcbIUScale.mmToIU( DEFAULT_LINE_WIDTH ), FILL_T::NO_FILL )
41{
42}
43
44
45PCB_SHAPE::PCB_SHAPE( BOARD_ITEM* aParent, SHAPE_T shapetype ) :
46 BOARD_ITEM( aParent, PCB_SHAPE_T ),
47 EDA_SHAPE( shapetype, pcbIUScale.mmToIU( DEFAULT_LINE_WIDTH ), FILL_T::NO_FILL )
48{
49}
50
51
53{
54}
55
56
57bool PCB_SHAPE::IsType( const std::vector<KICAD_T>& aScanTypes ) const
58{
59 if( BOARD_ITEM::IsType( aScanTypes ) )
60 return true;
61
62 bool sametype = false;
63
64 for( KICAD_T scanType : aScanTypes )
65 {
66 if( scanType == PCB_LOCATE_GRAPHIC_T )
67 return true;
68 else if( scanType == PCB_LOCATE_BOARD_EDGE_T )
69 sametype = m_layer == Edge_Cuts;
70 else if( scanType == PCB_SHAPE_LOCATE_ARC_T )
71 sametype = m_shape == SHAPE_T::ARC;
72 else if( scanType == PCB_SHAPE_LOCATE_CIRCLE_T )
73 sametype = m_shape == SHAPE_T::CIRCLE;
74 else if( scanType == PCB_SHAPE_LOCATE_RECT_T )
75 sametype = m_shape == SHAPE_T::RECT;
76 else if( scanType == PCB_SHAPE_LOCATE_SEGMENT_T )
77 sametype = m_shape == SHAPE_T::SEGMENT;
78 else if( scanType == PCB_SHAPE_LOCATE_POLY_T )
79 sametype = m_shape == SHAPE_T::POLY;
80 else if( scanType == PCB_SHAPE_LOCATE_BEZIER_T )
81 sametype = m_shape == SHAPE_T::BEZIER;
82
83 if( sametype )
84 return true;
85 }
86
87 return false;
88}
89
90
92{
93 // For some shapes return the visual center, but for not filled polygonal shapes,
94 // the center is usually far from the shape: a point on the outline is better
95
96 switch( m_shape )
97 {
98 case SHAPE_T::CIRCLE:
99 if( !IsFilled() )
100 return VECTOR2I( GetCenter().x + GetRadius(), GetCenter().y );
101 else
102 return GetCenter();
103
104 case SHAPE_T::RECT:
105 if( !IsFilled() )
106 return GetStart();
107 else
108 return GetCenter();
109
110 case SHAPE_T::POLY:
111 if( !IsFilled() )
112 {
113 VECTOR2I pos = GetPolyShape().Outline(0).CPoint(0);
114 return VECTOR2I( pos.x, pos.y );
115 }
116 else
117 {
118 return GetCenter();
119 }
120
121 case SHAPE_T::ARC:
122 return GetArcMid();
123
124 case SHAPE_T::BEZIER:
125 return GetStart();
126
127 default:
128 return GetCenter();
129 }
130}
131
132
133std::vector<VECTOR2I> PCB_SHAPE::GetCorners() const
134{
135 std::vector<VECTOR2I> pts;
136
137 if( GetShape() == SHAPE_T::RECT )
138 {
139 pts = GetRectCorners();
140 }
141 else if( GetShape() == SHAPE_T::POLY )
142 {
143 VECTOR2I offset = getParentPosition();
144
145 for( int ii = 0; ii < GetPolyShape().OutlineCount(); ++ii )
146 {
147 for( const VECTOR2I& pt : GetPolyShape().Outline( ii ).CPoints() )
148 pts.emplace_back( pt + offset );
149 }
150 }
151 else
152 {
154 }
155
156 while( pts.size() < 4 )
157 pts.emplace_back( pts.back() + VECTOR2I( 10, 10 ) );
158
159 return pts;
160}
161
162
163void PCB_SHAPE::Move( const VECTOR2I& aMoveVector )
164{
165 move( aMoveVector );
166}
167
168
169void PCB_SHAPE::Scale( double aScale )
170{
171 scale( aScale );
172}
173
174
176{
177 if( m_shape == SHAPE_T::RECT )
178 {
179 VECTOR2I start = GetStart();
180 VECTOR2I end = GetEnd();
181
182 BOX2I rect( start, end - start );
183 rect.Normalize();
184
185 SetStart( rect.GetPosition() );
186 SetEnd( rect.GetEnd() );
187 }
188}
189
190
191void PCB_SHAPE::Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle )
192{
193 rotate( aRotCentre, aAngle );
194}
195
196
197void PCB_SHAPE::Flip( const VECTOR2I& aCentre, bool aFlipLeftRight )
198{
199 flip( aCentre, aFlipLeftRight );
200
201 SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
202}
203
204
205void PCB_SHAPE::Mirror( const VECTOR2I& aCentre, bool aMirrorAroundXAxis )
206{
207 // Mirror an edge of the footprint. the layer is not modified
208 // This is a footprint shape modification.
209
210 switch( GetShape() )
211 {
212 case SHAPE_T::ARC:
213 case SHAPE_T::SEGMENT:
214 case SHAPE_T::RECT:
215 case SHAPE_T::CIRCLE:
216 case SHAPE_T::BEZIER:
217 if( aMirrorAroundXAxis )
218 {
219 MIRROR( m_start.y, aCentre.y );
220 MIRROR( m_end.y, aCentre.y );
221 MIRROR( m_arcCenter.y, aCentre.y );
222 MIRROR( m_bezierC1.y, aCentre.y );
223 MIRROR( m_bezierC2.y, aCentre.y );
224 }
225 else
226 {
227 MIRROR( m_start.x, aCentre.x );
228 MIRROR( m_end.x, aCentre.x );
229 MIRROR( m_arcCenter.x, aCentre.x );
230 MIRROR( m_bezierC1.x, aCentre.x );
231 MIRROR( m_bezierC2.x, aCentre.x );
232 }
233
234 if( GetShape() == SHAPE_T::ARC )
235 std::swap( m_start, m_end );
236
237 if( GetShape() == SHAPE_T::BEZIER )
239
240 break;
241
242 case SHAPE_T::POLY:
243 m_poly.Mirror( !aMirrorAroundXAxis, aMirrorAroundXAxis, aCentre );
244 break;
245
246 default:
248 }
249}
250
251
253{
254 return dynamic_cast<FOOTPRINT*>( BOARD_ITEM::GetParentFootprint() );
255}
256
257
259{
260 if( GetParentFootprint() )
262 else
263 return ANGLE_0;
264}
265
266
268{
269 if( GetParentFootprint() )
271 else
272 return VECTOR2I( 0, 0 );
273}
274
275
276double PCB_SHAPE::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
277{
278 constexpr double HIDE = std::numeric_limits<double>::max();
279 constexpr double SHOW = 0.0;
280
281 KIGFX::PCB_PAINTER* painter = static_cast<KIGFX::PCB_PAINTER*>( aView->GetPainter() );
282 KIGFX::PCB_RENDER_SETTINGS* renderSettings = painter->GetSettings();
283
284 if( aLayer == LAYER_LOCKED_ITEM_SHADOW )
285 {
286 // Hide shadow if the main layer is not shown
287 if( !aView->IsLayerVisible( m_layer ) )
288 return HIDE;
289
290 // Hide shadow on dimmed tracks
291 if( renderSettings->GetHighContrast() )
292 {
293 if( m_layer != renderSettings->GetPrimaryHighContrastLayer() )
294 return HIDE;
295 }
296 }
297
298 return SHOW;
299}
300
301
302void PCB_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
303{
304 aList.emplace_back( _( "Type" ), _( "Drawing" ) );
305
306 if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
307 aList.emplace_back( _( "Status" ), _( "Locked" ) );
308
309 ShapeGetMsgPanelInfo( aFrame, aList );
310
311 aList.emplace_back( _( "Layer" ), GetLayerName() );
312}
313
314
315wxString PCB_SHAPE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
316{
317 return wxString::Format( _( "%s on %s" ), ShowShape(), GetLayerName() );
318}
319
320
322{
324}
325
326
328{
329 return new PCB_SHAPE( *this );
330}
331
332
334{
335 BOX2I return_box = EDA_ITEM::ViewBBox();
336
337 // Inflate the bounding box by just a bit more for safety.
338 return_box.Inflate( GetWidth() );
339
340 return return_box;
341}
342
343
344std::shared_ptr<SHAPE> PCB_SHAPE::GetEffectiveShape( PCB_LAYER_ID aLayer, FLASHING aFlash ) const
345{
346 return std::make_shared<SHAPE_COMPOUND>( MakeEffectiveShapes() );
347}
348
349
351{
352 PCB_SHAPE* image = dynamic_cast<PCB_SHAPE*>( aImage );
353 assert( image );
354
355 SwapShape( image );
356
357 // Swap params not handled by SwapShape( image )
358 std::swap( m_layer, image->m_layer );
359 std::swap( m_isKnockout, image->m_isKnockout );
360 std::swap( m_isLocked, image->m_isLocked );
361 std::swap( m_flags, image->m_flags );
362 std::swap( m_status, image->m_status );
363 std::swap( m_parent, image->m_parent );
364 std::swap( m_forceVisible, image->m_forceVisible );
365}
366
367
369 const BOARD_ITEM* aSecond ) const
370{
371 if( aFirst->Type() != aSecond->Type() )
372 return aFirst->Type() < aSecond->Type();
373
374 if( aFirst->GetLayer() != aSecond->GetLayer() )
375 return aFirst->GetLayer() < aSecond->GetLayer();
376
377 if( aFirst->Type() == PCB_SHAPE_T )
378 {
379 const PCB_SHAPE* dwgA = static_cast<const PCB_SHAPE*>( aFirst );
380 const PCB_SHAPE* dwgB = static_cast<const PCB_SHAPE*>( aSecond );
381
382 if( dwgA->GetShape() != dwgB->GetShape() )
383 return dwgA->GetShape() < dwgB->GetShape();
384 }
385
386 return aFirst->m_Uuid < aSecond->m_Uuid;
387}
388
389
391 int aClearance, int aError, ERROR_LOC aErrorLoc,
392 bool ignoreLineWidth ) const
393{
394 EDA_SHAPE::TransformShapeToPolygon( aBuffer, aClearance, aError, aErrorLoc, ignoreLineWidth );
395}
396
397
398static struct PCB_SHAPE_DESC
399{
401 {
408
411
412 propMgr.ReplaceProperty( TYPE_HASH( BOARD_ITEM ), _HKI( "Layer" ), layerProperty );
413
414 // Only polygons have meaningful Position properties.
415 // On other shapes, these are duplicates of the Start properties.
416 auto isPolygon =
417 []( INSPECTABLE* aItem ) -> bool
418 {
419 if( PCB_SHAPE* shape = dynamic_cast<PCB_SHAPE*>( aItem ) )
420 return shape->GetShape() == SHAPE_T::POLY;
421
422 return false;
423 };
424
426 _HKI( "Position X" ), isPolygon );
428 _HKI( "Position Y" ), isPolygon );
429 }
constexpr EDA_IU_SCALE pcbIUScale
Definition: base_units.h:109
BITMAPS
A list of all bitmap identifiers.
Definition: bitmaps_list.h:33
@ add_dashed_line
#define DEFAULT_LINE_WIDTH
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:70
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
Definition: board_item.h:192
bool m_isKnockout
Definition: board_item.h:342
PCB_LAYER_ID m_layer
Definition: board_item.h:341
bool m_isLocked
Definition: board_item.h:344
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition: board_item.h:226
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
Definition: board_item.cpp:43
virtual bool IsLocked() const
Definition: board_item.cpp:71
BOARD_ITEM_CONTAINER * GetParentFootprint() const
Definition: board_item.cpp:239
wxString GetLayerName() const
Return the name of the PCB layer on which the item resides.
Definition: board_item.cpp:94
BOX2< Vec > & Normalize()
Ensure that the height and width are positive.
Definition: box2.h:119
const Vec & GetPosition() const
Definition: box2.h:184
const Vec GetEnd() const
Definition: box2.h:185
BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
Definition: box2.h:506
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:85
const KIID m_Uuid
Definition: eda_item.h:492
bool m_forceVisible
Definition: eda_item.h:497
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
EDA_ITEM_FLAGS m_status
Definition: eda_item.h:495
EDA_ITEM_FLAGS m_flags
Definition: eda_item.h:498
virtual bool IsType(const std::vector< KICAD_T > &aScanTypes) const
Check whether the item is one of the listed types.
Definition: eda_item.h:181
virtual const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
Definition: eda_item.cpp:254
EDA_ITEM * m_parent
Linked list: Link (parent struct)
Definition: eda_item.h:496
SHAPE_T m_shape
Definition: eda_shape.h:364
void move(const VECTOR2I &aMoveVector)
Definition: eda_shape.cpp:173
void rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle)
Definition: eda_shape.cpp:263
void flip(const VECTOR2I &aCentre, bool aFlipLeftRight)
Definition: eda_shape.cpp:320
void RebuildBezierToSegmentsPointsList(int aMinSegLen)
Rebuild the m_bezierPoints vertex list that approximate the Bezier curve by a list of segments.
Definition: eda_shape.cpp:405
virtual std::vector< SHAPE * > MakeEffectiveShapes(bool aEdgeOnly=false) const
Make a set of SHAPE objects representing the EDA_SHAPE.
Definition: eda_shape.h:289
SHAPE_POLY_SET & GetPolyShape()
Definition: eda_shape.h:247
bool IsFilled() const
Definition: eda_shape.h:90
void ShapeGetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList)
Definition: eda_shape.cpp:626
int GetRadius() const
Definition: eda_shape.cpp:523
SHAPE_T GetShape() const
Definition: eda_shape.h:113
VECTOR2I m_arcCenter
Definition: eda_shape.h:372
wxString ShowShape() const
Definition: eda_shape.cpp:57
VECTOR2I m_start
Definition: eda_shape.h:369
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
Definition: eda_shape.h:145
void SetStart(const VECTOR2I &aStart)
Definition: eda_shape.h:124
const VECTOR2I & GetStart() const
Return the starting point of the graphic.
Definition: eda_shape.h:120
void SwapShape(EDA_SHAPE *aImage)
Definition: eda_shape.cpp:1485
std::vector< VECTOR2I > GetRectCorners() const
Definition: eda_shape.cpp:1035
int GetWidth() const
Definition: eda_shape.h:109
void SetEnd(const VECTOR2I &aEnd)
Definition: eda_shape.h:149
wxString SHAPE_T_asString() const
Definition: eda_shape.cpp:75
void scale(double aScale)
Definition: eda_shape.cpp:208
VECTOR2I m_end
Definition: eda_shape.h:370
SHAPE_POLY_SET m_poly
Definition: eda_shape.h:379
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const
Convert the shape to a closed polygon.
Definition: eda_shape.cpp:1549
VECTOR2I m_bezierC1
Definition: eda_shape.h:375
VECTOR2I m_bezierC2
Definition: eda_shape.h:376
VECTOR2I GetArcMid() const
Definition: eda_shape.cpp:488
EDA_ANGLE GetOrientation() const
Definition: footprint.h:191
VECTOR2I GetPosition() const override
Definition: footprint.h:188
Class that other classes need to inherit from, in order to be inspectable.
Definition: inspectable.h:36
Contains methods for drawing PCB-specific items.
Definition: pcb_painter.h:158
virtual PCB_RENDER_SETTINGS * GetSettings() override
Return a pointer to current settings that are going to be used when drawing items.
Definition: pcb_painter.h:163
PCB specific render settings.
Definition: pcb_painter.h:72
PCB_LAYER_ID GetPrimaryHighContrastLayer() const
Return the board layer which is in high-contrast mode.
bool GetHighContrast() const
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition: view.h:69
bool IsLayerVisible(int aLayer) const
Return information about visibility of a particular layer.
Definition: view.h:410
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
Definition: view.h:213
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.
Definition: pcb_shape.cpp:302
virtual void swapData(BOARD_ITEM *aImage) override
Definition: pcb_shape.cpp:350
EDA_ANGLE getParentOrientation() const override
Definition: pcb_shape.cpp:258
virtual void Flip(const VECTOR2I &aCentre, bool aFlipLeftRight) override
Flip this object, i.e.
Definition: pcb_shape.cpp:197
VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
Definition: pcb_shape.h:67
virtual void Rotate(const VECTOR2I &aRotCentre, const EDA_ANGLE &aAngle) override
Rotate this object.
Definition: pcb_shape.cpp:191
virtual BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
Definition: pcb_shape.cpp:321
PCB_SHAPE(BOARD_ITEM *aParent, KICAD_T aItemType, SHAPE_T aShapeType)
Definition: pcb_shape.cpp:38
FOOTPRINT * GetParentFootprint() const
Return the parent footprint or NULL if PCB_SHAPE does not belong to a footprint.
Definition: pcb_shape.cpp:252
void NormalizeRect()
Definition: pcb_shape.cpp:175
virtual const BOX2I ViewBBox() const override
Definition: pcb_shape.cpp:333
std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const override
Make a set of SHAPE objects representing the PCB_SHAPE.
Definition: pcb_shape.cpp:344
const VECTOR2I GetFocusPosition() const override
Allows items to return their visual center rather than their anchor.
Definition: pcb_shape.cpp:91
virtual wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
Definition: pcb_shape.cpp:315
virtual std::vector< VECTOR2I > GetCorners() const
Return 4 corners for a rectangle or rotated rectangle (stored as a poly).
Definition: pcb_shape.cpp:133
VECTOR2I getParentPosition() const override
Definition: pcb_shape.cpp:267
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const override
Convert the shape to a closed polygon.
Definition: pcb_shape.cpp:390
virtual void Move(const VECTOR2I &aMoveVector) override
Move this object.
Definition: pcb_shape.cpp:163
virtual EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition: pcb_shape.cpp:327
double ViewGetLOD(int aLayer, KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
Definition: pcb_shape.cpp:276
virtual void Mirror(const VECTOR2I &aCentre, bool aMirrorAroundXAxis)
Definition: pcb_shape.cpp:205
void Scale(double aScale)
Definition: pcb_shape.cpp:169
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
Definition: pcb_shape.cpp:57
Provide class metadata.Helper macro to map type hashes to names.
Definition: property_mgr.h:74
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
static PROPERTY_MANAGER & Instance()
Definition: property_mgr.h:76
void OverrideAvailability(TYPE_ID aDerived, TYPE_ID aBase, const wxString &aName, std::function< bool(INSPECTABLE *)> aFunc)
Sets an override availability functor for a base class property of a given derived class.
PROPERTY_BASE & ReplaceProperty(size_t aBase, const wxString &aName, PROPERTY_BASE *aNew, const wxString &aGroup=wxEmptyString)
Replace an existing property for a specific type.
void AddTypeCast(TYPE_CAST_BASE *aCast)
Register a type converter.
const VECTOR2I & CPoint(int aIndex) const
Return a reference to a given point in the line chain.
const std::vector< VECTOR2I > & CPoints() const
Represent a set of closed polygons.
void Mirror(bool aX=true, bool aY=false, const VECTOR2I &aRef={ 0, 0 })
Mirror the line points about y or x (or both)
SHAPE_LINE_CHAIN & Outline(int aIndex)
int OutlineCount() const
Return the number of vertices in a given outline/hole.
#define _HKI(x)
#define _(s)
static constexpr EDA_ANGLE & ANGLE_0
Definition: eda_angle.h:429
#define PCB_EDIT_FRAME_NAME
SHAPE_T
Definition: eda_shape.h:41
FILL_T
Definition: eda_shape.h:54
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
FLASHING
Enum used during connectivity building to ensure we do not query connectivity while building the data...
Definition: layer_ids.h:147
@ LAYER_LOCKED_ITEM_SHADOW
shadow layer for locked items
Definition: layer_ids.h:239
PCB_LAYER_ID
A quick note on layer IDs:
Definition: layer_ids.h:59
@ Edge_Cuts
Definition: layer_ids.h:113
PCB_LAYER_ID FlipLayer(PCB_LAYER_ID aLayerId, int aCopperLayersCount)
Definition: lset.cpp:544
This file contains miscellaneous commonly used macros and functions.
#define UNIMPLEMENTED_FOR(type)
Definition: macros.h:120
void MIRROR(T &aPoint, const T &aMirrorRef)
Updates aPoint with the mirror of aPoint relative to the aMirrorRef.
Definition: mirror.h:40
static struct PCB_SHAPE_DESC _PCB_SHAPE_DESC
#define TYPE_HASH(x)
Definition: property.h:63
#define REGISTER_TYPE(x)
Definition: property_mgr.h:328
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
bool operator()(const BOARD_ITEM *aFirst, const BOARD_ITEM *aSecond) const
Definition: pcb_shape.cpp:368
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:78
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
Definition: typeinfo.h:88
@ PCB_LOCATE_BOARD_EDGE_T
Definition: typeinfo.h:128
@ PCB_LOCATE_GRAPHIC_T
Definition: typeinfo.h:124
@ PCB_SHAPE_LOCATE_CIRCLE_T
Definition: typeinfo.h:133
@ PCB_SHAPE_LOCATE_SEGMENT_T
Definition: typeinfo.h:131
@ PCB_SHAPE_LOCATE_RECT_T
Definition: typeinfo.h:132
@ PCB_SHAPE_LOCATE_BEZIER_T
Definition: typeinfo.h:136
@ PCB_SHAPE_LOCATE_POLY_T
Definition: typeinfo.h:135
@ PCB_SHAPE_LOCATE_ARC_T
Definition: typeinfo.h:134
VECTOR2< int > VECTOR2I
Definition: vector2d.h:590