KiCad PCB EDA Suite
class_track.h
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) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
5  * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
30 #ifndef CLASS_TRACK_H
31 #define CLASS_TRACK_H
32 
33 
34 #include <board_connected_item.h>
35 #include <class_board_item.h>
36 #include <convert_to_biu.h>
37 #include <pcb_display_options.h>
38 #include <pcbnew.h>
39 
40 #include <geometry/seg.h>
41 #include <geometry/shape_arc.h>
42 
43 #include <trigo.h>
44 
45 
46 class TRACK;
47 class VIA;
48 class D_PAD;
49 class MSG_PANEL_ITEM;
50 class SHAPE_POLY_SET;
51 
52 
53 // Flag used in locate routines (from which endpoint work)
54 enum ENDPOINT_T : int
55 {
58 };
59 
60 // Via types
61 // Note that this enum must be synchronized to GAL_LAYER_ID
62 enum class VIATYPE : int
63 {
64  THROUGH = 3, /* Always a through hole via */
65  BLIND_BURIED = 2, /* this via can be on internal layers */
66  MICROVIA = 1, /* this via which connect from an external layer
67  * to the near neighbor internal layer */
68  NOT_DEFINED = 0 /* not yet used */
69 };
70 
71 #define UNDEFINED_DRILL_DIAMETER -1 //< Undefined via drill diameter.
72 
73 #define MIN_VIA_DRAW_SIZE 4
74 
75 // Used for tracks and vias for algorithmic safety, not to enforce constraints
76 #define GEOMETRY_MIN_SIZE ( int )( 0.001 * IU_PER_MM )
77 
78 
80 {
81 public:
82  static inline bool ClassOf( const EDA_ITEM* aItem )
83  {
84  return aItem && PCB_TRACE_T == aItem->Type();
85  }
86 
87  TRACK( BOARD_ITEM* aParent, KICAD_T idtype = PCB_TRACE_T );
88 
89  // Do not create a copy constructor. The one generated by the compiler is adequate.
90 
91  void Move( const wxPoint& aMoveVector ) override
92  {
93  m_Start += aMoveVector;
94  m_End += aMoveVector;
95  }
96 
97  void Rotate( const wxPoint& aRotCentre, double aAngle ) override;
98 
99  void Flip( const wxPoint& aCentre, bool aFlipLeftRight ) override;
100 
101  void SetPosition( const wxPoint& aPos ) override { m_Start = aPos; }
102  const wxPoint GetPosition() const override { return m_Start; }
103 
104  void SetWidth( int aWidth ) { m_Width = aWidth; }
105  int GetWidth() const { return m_Width; }
106 
107  void SetEnd( const wxPoint& aEnd ) { m_End = aEnd; }
108  const wxPoint& GetEnd() const { return m_End; }
109 
110  void SetStart( const wxPoint& aStart ) { m_Start = aStart; }
111  const wxPoint& GetStart() const { return m_Start; }
112 
113 
115  const wxPoint& GetEndPoint( ENDPOINT_T aEndPoint ) const
116  {
117  if( aEndPoint == ENDPOINT_START )
118  return m_Start;
119  else
120  return m_End;
121  }
122 
123  // Virtual function
124  const EDA_RECT GetBoundingBox() const override;
125 
126  bool IsLocked() const override
127  {
128  return GetState( TRACK_LOCKED );
129  }
130 
131  void SetLocked( bool aLocked ) override
132  {
133  return SetState( TRACK_LOCKED, aLocked );
134  }
135 
141  virtual double GetLength() const
142  {
143  return GetLineLength( m_Start, m_End );
144  }
145 
146  void Print( PCB_BASE_FRAME* aFrame, wxDC* DC, const wxPoint& aOffset = ZeroOffset ) override;
147 
159  void TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer, int aClearanceValue,
160  int aError = ARC_HIGH_DEF, bool ignoreLineWidth = false ) const override;
168  STATUS_FLAGS IsPointOnEnds( const wxPoint& point, int min_dist = 0 ) const;
169 
174  bool IsNull() const
175  {
176  return ( Type() == PCB_VIA_T ) || ( m_Start == m_End );
177  }
178 
179  void GetMsgPanelInfo( EDA_UNITS aUnits, std::vector<MSG_PANEL_ITEM>& aList ) override;
180 
181  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
182 
183  bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
184  bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
185 
186  bool ApproxCollinear( const TRACK& aTrack )
187  {
188  SEG a( m_Start, m_End );
189  SEG b( aTrack.GetStart(), aTrack.GetEnd() );
190  return a.ApproxCollinear( b );
191  }
192 
193  wxString GetClass() const override
194  {
195  return wxT( "TRACK" );
196  }
197 
207  virtual int GetClearance( BOARD_CONNECTED_ITEM* aItem = NULL ) const override;
208 
209  virtual wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
210 
211  BITMAP_DEF GetMenuImage() const override;
212 
213  virtual EDA_ITEM* Clone() const override;
214 
215  virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;
216 
217  virtual unsigned int ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override;
218 
219  const BOX2I ViewBBox() const override;
220 
221  virtual void SwapData( BOARD_ITEM* aImage ) override;
222 
226  bool IsOnCopperLayer() const override
227  {
228  return true;
229  }
230 
231 #if defined (DEBUG)
232  virtual void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
233 
239  static wxString ShowState( int stateBits );
240 
241 #endif
242 
243 protected:
249  virtual void GetMsgPanelInfoBase( EDA_UNITS aUnits, std::vector<MSG_PANEL_ITEM>& aList );
250 
251 
252  void GetMsgPanelInfoBase_Common( EDA_UNITS aUnits, std::vector<MSG_PANEL_ITEM>& aList );
253 
254 
255  int m_Width;
258 
259 };
260 
261 
262 class ARC : public TRACK
263 {
264 public:
265  ARC( BOARD_ITEM* aParent ) : TRACK( aParent, PCB_ARC_T ){};
266 
267  ARC( BOARD_ITEM* aParent, const SHAPE_ARC* aArc ) :
268  TRACK( aParent, PCB_ARC_T )
269  {
270  m_Start = wxPoint( aArc->GetP0() );
271  m_End = wxPoint( aArc->GetP1() );
272  m_Mid = wxPoint( aArc->GetArcMid() );
273  }
274 
275  static inline bool ClassOf( const EDA_ITEM *aItem )
276  {
277  return aItem && PCB_ARC_T == aItem->Type();
278  }
279 
280  virtual void Move( const wxPoint& aMoveVector ) override
281  {
282  m_Start += aMoveVector;
283  m_Mid += aMoveVector;
284  m_End += aMoveVector;
285  }
286 
287  virtual void Rotate( const wxPoint& aRotCentre, double aAngle ) override;
288 
289  virtual void Flip( const wxPoint& aCentre, bool aFlipLeftRight ) override;
290 
291  void SetMid( const wxPoint& aMid ) { m_Mid = aMid; }
292  const wxPoint& GetMid() const { return m_Mid; }
293 
294  void SetPosition( const wxPoint& aPos ) override
295  {
296  printf("Setting the arc position\n");
297  m_Start = aPos;
298  }
299 
300  virtual const wxPoint GetPosition() const override;
301 
302  double GetRadius() const;
303  double GetAngle() const;
304  double GetArcAngleStart() const;
305  double GetArcAngleEnd() const;
306 
307  virtual bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
308 
309  virtual bool HitTest( const EDA_RECT& aRect, bool aContained = true, int aAccuracy = 0 ) const override;
310 
311  wxString GetClass() const override
312  {
313  return wxT( "ARC" );
314  }
315 
316  //TODO(snh): Add GetSelectMenuText() and GetMsgPanelInfoBase()
317 
323  virtual double GetLength() const override
324  {
325  //TODO(snh): Add proper arc length calc
327  }
328 
329  EDA_ITEM* Clone() const override;
330 
331  virtual void SwapData( BOARD_ITEM* aImage ) override;
332 
333 protected:
334 
335 private:
337 };
338 
339 
340 class VIA : public TRACK
341 {
342 public:
343  VIA( BOARD_ITEM* aParent );
344 
345  static inline bool ClassOf( const EDA_ITEM *aItem )
346  {
347  return aItem && PCB_VIA_T == aItem->Type();
348  }
349 
350  // Do not create a copy constructor. The one generated by the compiler is adequate.
351 
352  void Print( PCB_BASE_FRAME* aFrame, wxDC* DC, const wxPoint& aOffset = ZeroOffset ) override;
353 
354  bool IsOnLayer( PCB_LAYER_ID aLayer ) const override;
355 
356  virtual LSET GetLayerSet() const override;
357 
365  void SetLayerPair( PCB_LAYER_ID aTopLayer, PCB_LAYER_ID aBottomLayer );
366 
367  void SetBottomLayer( PCB_LAYER_ID aLayer );
368  void SetTopLayer( PCB_LAYER_ID aLayer );
369 
377  void LayerPair( PCB_LAYER_ID* top_layer, PCB_LAYER_ID* bottom_layer ) const;
378 
379  PCB_LAYER_ID TopLayer() const;
380  PCB_LAYER_ID BottomLayer() const;
381 
387  void SanitizeLayers();
388 
389  const wxPoint GetPosition() const override { return m_Start; }
390  void SetPosition( const wxPoint& aPoint ) override { m_Start = aPoint; m_End = aPoint; }
391 
392  bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
393  bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
394 
395  wxString GetClass() const override
396  {
397  return wxT( "VIA" );
398  }
399 
400  wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
401 
402  BITMAP_DEF GetMenuImage() const override;
403 
404  EDA_ITEM* Clone() const override;
405 
406  void ViewGetLayers( int aLayers[], int& aCount ) const override;
407 
408  unsigned int ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override;
409 
410  void Flip( const wxPoint& aCentre, bool aFlipLeftRight ) override;
411 
412 #if defined (DEBUG)
413  void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
414 #endif
415 
417  {
418  return m_ViaType;
419  }
420 
421  void SetViaType( VIATYPE aViaType )
422  {
423  m_ViaType = aViaType;
424  }
425 
431  void SetDrill( int aDrill ) { m_Drill = aDrill; }
432 
438  int GetDrill() const { return m_Drill; }
439 
446  int GetDrillValue() const;
447 
453 
458  bool IsDrillDefault() const { return m_Drill <= 0; }
459 
460  virtual void SwapData( BOARD_ITEM* aImage ) override;
461 
462 protected:
463  void GetMsgPanelInfoBase( EDA_UNITS aUnits, std::vector<MSG_PANEL_ITEM>& aList ) override;
464 
465 private:
468 
469  VIATYPE m_ViaType; // Type of via
470 
471  int m_Drill; // for vias: via drill (- 1 for default value)
472 };
473 
474 
475 #endif // CLASS_TRACK_H
virtual void Rotate(const wxPoint &aRotCentre, double aAngle) override
Function Rotate Rotate this object.
bool IsLocked() const override
Function IsLocked.
Definition: class_track.h:126
EDA_UNITS
Definition: common.h:184
void LayerPair(PCB_LAYER_ID *top_layer, PCB_LAYER_ID *bottom_layer) const
Function LayerPair Return the 2 layers used by the via (the via actually uses all layers between thes...
VIATYPE m_ViaType
Definition: class_track.h:469
void SetPosition(const wxPoint &aPos) override
Definition: class_track.h:294
wxPoint m_Start
Line start point.
Definition: class_track.h:256
double GetLineLength(const wxPoint &aPointA, const wxPoint &aPointB)
Return the length of a line segment defined by aPointA and aPointB.
Definition: trigo.h:206
virtual void SwapData(BOARD_ITEM *aImage) override
Swap data between aItem and aImage.
PNG memory record (file in memory).
Definition: bitmap_def.h:29
static bool ClassOf(const EDA_ITEM *aItem)
Definition: class_track.h:82
virtual LSET GetLayerSet() const override
Function GetLayerSet returns a "layer mask", which is a bitmap of all layers on which the TRACK segme...
bool IsOnCopperLayer() const override
Definition: class_track.h:226
wxString GetClass() const override
Function GetClass returns the class name.
Definition: class_track.h:311
void SetPosition(const wxPoint &aPoint) override
Definition: class_track.h:390
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
void SetEnd(const wxPoint &aEnd)
Definition: class_track.h:107
const wxPoint & GetStart() const
Definition: class_track.h:111
Classes BOARD_ITEM and BOARD_CONNECTED_ITEM.
void GetMsgPanelInfo(EDA_UNITS aUnits, std::vector< MSG_PANEL_ITEM > &aList) override
Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects with it's internal state for displ...
bool IsDrillDefault() const
Function IsDrillDefault.
Definition: class_track.h:458
virtual void Flip(const wxPoint &aCentre, bool aFlipLeftRight) override
Function Flip Flip this object, i.e.
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Function HitTest tests if aPosition is contained within or on the bounding box of an item.
void TransformShapeWithClearanceToPolygon(SHAPE_POLY_SET &aCornerBuffer, int aClearanceValue, int aError=ARC_HIGH_DEF, bool ignoreLineWidth=false) const override
Function TransformShapeWithClearanceToPolygon Convert the track shape to a closed polygon Used in fil...
virtual void Move(const wxPoint &aMoveVector) override
Function Move move this object.
Definition: class_track.h:280
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
void ViewGetLayers(int aLayers[], int &aCount) const override
Function ViewGetLayers() Returns the all the layers within the VIEW the object is painted on.
virtual EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
Definition: class_track.cpp:73
class ARC, an arc track segment on a copper layer
Definition: typeinfo.h:98
void Print(PCB_BASE_FRAME *aFrame, wxDC *DC, const wxPoint &aOffset=ZeroOffset) override
Function Print BOARD_ITEMs have their own color information.
ARC(BOARD_ITEM *aParent)
Definition: class_track.h:265
virtual double GetLength() const override
Function GetLength returns the length of the arc track using a series of segment approximations.
Definition: class_track.h:323
void Move(const wxPoint &aMoveVector) override
Function Move move this object.
Definition: class_track.h:91
VIA(BOARD_ITEM *aParent)
Definition: class_track.cpp:85
void Rotate(const wxPoint &aRotCentre, double aAngle) override
Function Rotate Rotate this object.
BOARD_CONNECTED_ITEM is a base class derived from BOARD_ITEM for items that can be connected and have...
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
static wxPoint ZeroOffset
A value of wxPoint(0,0) which can be passed to the Draw() functions.
class TRACK, a track segment (segment on a copper layer)
Definition: typeinfo.h:96
int m_Width
Thickness of track, or via diameter.
Definition: class_track.h:255
void SetWidth(int aWidth)
Definition: class_track.h:104
virtual unsigned int ViewGetLOD(int aLayer, KIGFX::VIEW *aView) const override
Function ViewGetLOD() Returns the level of detail (LOD) of the item.
const INSPECTOR_FUNC & INSPECTOR
Definition: base_struct.h:108
void SetLocked(bool aLocked) override
Function SetLocked modifies 'lock' status for of the item.
Definition: class_track.h:131
static bool ClassOf(const EDA_ITEM *aItem)
Definition: class_track.h:345
PCB_LAYER_ID
A quick note on layer IDs:
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
LSET is a set of PCB_LAYER_IDs.
const wxPoint & GetMid() const
Definition: class_track.h:292
#define NULL
const wxPoint GetPosition() const override
Definition: class_track.h:102
int GetDrillValue() const
Function GetDrillValue "calculates" the drill value for vias (m-Drill if > 0, or default drill value ...
virtual void GetMsgPanelInfoBase(EDA_UNITS aUnits, std::vector< MSG_PANEL_ITEM > &aList)
Function GetMsgPanelInfoBase Display info about the track segment only, and does not calculate the fu...
SHAPE_POLY_SET.
int GetDrill() const
Function GetDrill returns the local drill setting for this VIA.
Definition: class_track.h:438
const VECTOR2I & GetP0() const
Definition: shape_arc.h:74
wxPoint m_End
Line end point.
Definition: class_track.h:257
int m_Drill
Definition: class_track.h:471
VIATYPE
Definition: class_track.h:62
void Flip(const wxPoint &aCentre, bool aFlipLeftRight) override
Function Flip Flip this object, i.e.
static bool ClassOf(const EDA_ITEM *aItem)
Definition: class_track.h:275
virtual wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
unsigned STATUS_FLAGS
Definition: base_struct.h:159
SEARCH_RESULT Visit(INSPECTOR inspector, void *testData, const KICAD_T scanTypes[]) override
Function Visit may be re-implemented for each derived class in order to handle all the types given by...
PCB_LAYER_ID m_BottomLayer
The bottom layer of the via (the top layer is in m_Layer)
Definition: class_track.h:467
bool ApproxCollinear(const SEG &aSeg) const
Definition: seg.h:249
unsigned int ViewGetLOD(int aLayer, KIGFX::VIEW *aView) const override
Function ViewGetLOD() Returns the level of detail (LOD) of the item.
const VECTOR2I GetP1() const
Definition: shape_arc.cpp:149
#define TRACK_LOCKED
Pcbnew: track locked: protected from global deletion.
Definition: base_struct.h:134
void SetLayerPair(PCB_LAYER_ID aTopLayer, PCB_LAYER_ID aBottomLayer)
Function SetLayerPair For a via m_Layer contains the top layer, the other layer is in m_BottomLayer.
ENDPOINT_T
Definition: class_track.h:54
double GetRadius() const
#define UNDEFINED_DRILL_DIAMETER
Definition: class_track.h:71
const VECTOR2I GetArcMid() const
Definition: shape_arc.cpp:162
const BOX2I ViewBBox() const override
Function ViewBBox() returns the bounding box of the item covering all its layers.
virtual int GetClearance(BOARD_CONNECTED_ITEM *aItem=NULL) const override
Function GetClearance returns the clearance in internal units.
void SetMid(const wxPoint &aMid)
Definition: class_track.h:291
const wxPoint GetPosition() const override
Definition: class_track.h:389
virtual void SwapData(BOARD_ITEM *aImage) override
Swap data between aItem and aImage.
void SetDrillDefault()
Function SetDrillDefault sets the drill value for vias to the default value UNDEFINED_DRILL_DIAMETER.
Definition: class_track.h:452
bool ApproxCollinear(const TRACK &aTrack)
Definition: class_track.h:186
virtual const wxPoint GetPosition() const override
Definition: seg.h:39
double GetAngle() const
virtual void ViewGetLayers(int aLayers[], int &aCount) const override
Function ViewGetLayers() Returns the all the layers within the VIEW the object is painted on.
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
wxString GetClass() const override
Function GetClass returns the class name.
Definition: class_track.h:395
void SetState(int type, int state)
Definition: base_struct.h:246
int GetWidth() const
Definition: class_track.h:105
STATUS_FLAGS IsPointOnEnds(const wxPoint &point, int min_dist=0) const
Function IsPointOnEnds returns STARTPOINT if point if near (dist = min_dist) start point,...
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
Definition: class_track.cpp:79
void SetTopLayer(PCB_LAYER_ID aLayer)
void SetPosition(const wxPoint &aPos) override
Definition: class_track.h:101
double GetArcAngleEnd() const
EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
void SetDrill(int aDrill)
Function SetDrill sets the drill value for vias.
Definition: class_track.h:431
VIATYPE GetViaType() const
Definition: class_track.h:416
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: base_struct.h:166
PCB_LAYER_ID TopLayer() const
const wxPoint & GetEnd() const
Definition: class_track.h:108
void SetBottomLayer(PCB_LAYER_ID aLayer)
virtual double GetLength() const
Function GetLength returns the length of the track using the hypotenuse calculation.
Definition: class_track.h:141
bool IsNull() const
Function IsNull returns true if segment length is zero.
Definition: class_track.h:174
virtual void SwapData(BOARD_ITEM *aImage) override
Swap data between aItem and aImage.
void SetStart(const wxPoint &aStart)
Definition: class_track.h:110
void GetMsgPanelInfoBase_Common(EDA_UNITS aUnits, std::vector< MSG_PANEL_ITEM > &aList)
double GetArcAngleStart() const
class VIA, a via (like a track segment on a copper layer)
Definition: typeinfo.h:97
TRACK(BOARD_ITEM *aParent, KICAD_T idtype=PCB_TRACE_T)
Definition: class_track.cpp:66
bool IsOnLayer(PCB_LAYER_ID aLayer) const override
Function IsOnLayer tests to see if this object is on the given layer.
EDA_MSG_ITEM is used EDA_MSG_PANEL as the item type for displaying messages.
Definition: msgpanel.h:53
VIEW.
Definition: view.h:61
ARC(BOARD_ITEM *aParent, const SHAPE_ARC *aArc)
Definition: class_track.h:267
SEARCH_RESULT
Definition: base_struct.h:54
void SanitizeLayers()
Function SanitizeLayers Check so that the layers are correct dependin on the type of via,...
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Function HitTest tests if aPosition is contained within or on the bounding box of an item.
const wxPoint & GetEndPoint(ENDPOINT_T aEndPoint) const
Return the selected endpoint (start or end)
Definition: class_track.h:115
void GetMsgPanelInfoBase(EDA_UNITS aUnits, std::vector< MSG_PANEL_ITEM > &aList) override
Function GetMsgPanelInfoBase Display info about the track segment only, and does not calculate the fu...
void SetViaType(VIATYPE aViaType)
Definition: class_track.h:421
PCB_LAYER_ID BottomLayer() const
int GetState(int type) const
Definition: base_struct.h:241
void Flip(const wxPoint &aCentre, bool aFlipLeftRight) override
Function Flip Flip this object, i.e.
wxPoint m_Mid
Arc mid point, halfway between start and end.
Definition: class_track.h:336
Definition of PCB_DISPLAY_OPTIONS class.
PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
virtual bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Function HitTest tests if aPosition is contained within or on the bounding box of an item.
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
Definition: class_track.cpp:94
KICAD_T Type() const
Function Type()
Definition: base_struct.h:212
void Print(PCB_BASE_FRAME *aFrame, wxDC *DC, const wxPoint &aOffset=ZeroOffset) override
Function Print BOARD_ITEMs have their own color information.
wxString GetClass() const override
Function GetClass returns the class name.
Definition: class_track.h:193