62 switch( aItem->
Type() )
76 std::vector<size_t> hashes;
84 std::sort( hashes.begin(), hashes.end() );
86 for(
size_t h : hashes )
95 ret = hash<int>{}(
via->GetDrillValue() );
99 via->GetLayerSet().RunOnLayers(
111 const PAD*
pad =
static_cast<const PAD*
>( aItem );
113 ret = hash<int>{}(
static_cast<int>(
pad->GetAttribute() ) );
141 for(
int ii = 0; ii < poly->VertexCount(); ++ii )
143 VECTOR2I point = poly->CVertex( ii ) -
pad->GetPosition();
154 pad->Padstack().ForEachUniqueLayer( hashPadLayer );
161 pad->GetLayerSet().RunOnLayers(
187 if( !( aFlags &
HASH_REF ) &&
static_cast<const PCB_FIELD*
>( aItem )->IsReference() )
211 :
text->GetPosition();
252 std::vector<VECTOR2I> points;
254 points.push_back( shape->
GetStart() );
255 points.push_back( shape->
GetEnd() );
270 points.push_back( *it );
296 if( points.size() > 1 )
298 if( points[0].x > points[1].x || points[0].y > points[1].y )
300 std::swap( points[0], points[1] );
375 hash_stroke(
table->GetSeparatorsStroke() );
376 hash_stroke(
table->GetBorderStroke() );
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
FOOTPRINT * GetParentFootprint() const
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
const VECTOR2I & GetBezierC2() const
FILL_T GetFillMode() const
SHAPE_POLY_SET & GetPolyShape()
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
LINE_STYLE GetLineStyle() const
const VECTOR2I & GetStart() const
Return the starting point of the graphic.
const VECTOR2I & GetBezierC1() const
VECTOR2I GetArcMid() const
int GetTextHeight() const
const EDA_ANGLE & GetTextAngle() const
virtual const wxString & GetText() const
Return the string associated with the text object.
GR_TEXT_H_ALIGN_T GetHorizJustify() const
GR_TEXT_V_ALIGN_T GetVertJustify() const
virtual wxString GetClass() const =0
Return the class name.
static constexpr PCB_LAYER_ID ALL_LAYERS
! Temporary layer identifier to identify code that is not padstack-aware
PCB_TEXT & Text()
Access the internal PCB_TEXT object used for showing the human-readable text.
const VECTOR2I & GetMargin() const
Get the barcode margin (in internal units).
VECTOR2I GetPosition() const override
Get the position (center) of the barcode in internal units.
int GetHeight() const
Get the barcode height (in internal units).
BARCODE_ECC_T GetErrorCorrection() const
EDA_ANGLE GetAngle() const
BARCODE_T GetKind() const
Returns the type of the barcode (QR, CODE_39, etc.).
int GetWidth() const
Get the barcode width (in internal units).
VECTOR2I GetCenter() const override
This defaults to the center of the bounding box if not overridden.
int GetWidth() const override
VECTOR2I GetPosition() const override
Represent a set of closed polygons.
CONST_ITERATOR CIterateWithHoles(int aOutline) const
Simple container to manage line stroke parameters.
static constexpr void hash_combine(std::size_t &seed)
This is a dummy function to take the final case of hash_combine below.
size_t hash_fp_item(const EDA_ITEM *aItem, int aFlags)
Calculate hash of an EDA_ITEM.
static size_t hash_board_item(const BOARD_ITEM *aItem, int aFlags)
Hashing functions for EDA_ITEMs.
@ REL_COORD
Use coordinates relative to the parent object.
@ REL_POS
Use coordinates relative to the shape position.
PCB_LAYER_ID
A quick note on layer IDs:
This file contains miscellaneous commonly used macros and functions.
#define KI_FALLTHROUGH
The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from ...
#define UNIMPLEMENTED_FOR(type)
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
@ PTH
Plated through hole pad.
BARCODE class definition.
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
@ PCB_BARCODE_T
class PCB_BARCODE, a barcode (graphic item)
@ PCB_TABLECELL_T
class PCB_TABLECELL, PCB_TEXTBOX for use in tables
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_PAD_T
class PAD, a pad in a footprint
@ PCB_TABLE_T
class PCB_TABLE, table of PCB_TABLECELLs
VECTOR2< int32_t > VECTOR2I