KiCad PCB EDA Suite
class_board_item.h File Reference

Classes BOARD_ITEM and BOARD_CONNECTED_ITEM. More...

#include <base_struct.h>
#include <convert_to_biu.h>
#include <gr_basic.h>
#include <layers_id_colors_and_visibility.h>

Go to the source code of this file.

Classes

class  BOARD_ITEM
 BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class, and therefore instances of derived classes should only be found in Pcbnew or other programs that use class BOARD and its contents. More...
 

Enumerations

enum  STROKE_T {
  S_SEGMENT = 0, S_RECT, S_ARC, S_CIRCLE,
  S_POLYGON, S_CURVE, S_LAST
}
 Enum STROKE_T is the set of shapes for segments (graphic segments and tracks) which are often in the .m_Shape member. More...
 

Functions

static wxString STROKE_T_asString (STROKE_T a)
 

Detailed Description

Classes BOARD_ITEM and BOARD_CONNECTED_ITEM.

Definition in file class_board_item.h.

Enumeration Type Documentation

◆ STROKE_T

enum STROKE_T

Enum STROKE_T is the set of shapes for segments (graphic segments and tracks) which are often in the .m_Shape member.

Enumerator
S_SEGMENT 

usual segment : line with rounded ends

S_RECT 

segment with non rounded ends

S_ARC 

Arcs (with rounded ends)

S_CIRCLE 

ring

S_POLYGON 

polygon (not yet used for tracks, but could be in microwave apps)

S_CURVE 

Bezier Curve.

S_LAST 

last value for this list

Definition at line 51 of file class_board_item.h.

52 {
53  S_SEGMENT = 0,
54  S_RECT,
55  S_ARC,
56  S_CIRCLE,
57  S_POLYGON,
58  S_CURVE,
59  S_LAST
60 };
polygon (not yet used for tracks, but could be in microwave apps)
usual segment : line with rounded ends
segment with non rounded ends
Arcs (with rounded ends)
last value for this list
Bezier Curve.

Function Documentation

◆ STROKE_T_asString()

static wxString STROKE_T_asString ( STROKE_T  a)
inlinestatic

Definition at line 62 of file class_board_item.h.

63 {
64  switch( a )
65  {
66  case S_SEGMENT: return "S_SEGMENT";
67  case S_RECT: return "S_RECT";
68  case S_ARC: return "S_ARC";
69  case S_CIRCLE: return "S_CIRCLE";
70  case S_POLYGON: return "S_POLYGON";
71  case S_CURVE: return "S_CURVE";
72  case S_LAST: return "S_LAST"; // Synthetic value, but if we come across it we're
73  // going to want to know.
74  }
75 
76  return wxEmptyString; // Just to quiet GCC.
77 };
polygon (not yet used for tracks, but could be in microwave apps)
usual segment : line with rounded ends
segment with non rounded ends
Arcs (with rounded ends)
last value for this list
Bezier Curve.

References S_ARC, S_CIRCLE, S_CURVE, S_LAST, S_POLYGON, S_RECT, and S_SEGMENT.

Referenced by BOARD_ADAPTER::AddShapeWithClearanceToContainer(), GRAPHICS_CLEANER::areEquivalent(), DRAWSEGMENT::Flip(), PCB_IO::format(), DRAWSEGMENT::GetBoundingBox(), DRAWSEGMENT::GetCenter(), DRAWSEGMENT::HitTest(), GRAPHICS_CLEANER::isNullSegment(), DRAWSEGMENT::MakeEffectiveShapes(), DRAWSEGMENT::Rotate(), DRC::testCopperDrawItem(), and DRAWSEGMENT::TransformShapeWithClearanceToPolygon().