KiCad PCB EDA Suite
GRID_HELPER::ANCHOR Struct Reference

#include <grid_helper.h>

Public Member Functions

 ANCHOR (VECTOR2I aPos, int aFlags=CORNER|SNAPPABLE, EDA_ITEM *aItem=NULL)
 
double Distance (const VECTOR2I &aP) const
 

Public Attributes

VECTOR2I pos
 
int flags
 
EDA_ITEMitem
 

Detailed Description

Definition at line 88 of file grid_helper.h.

Constructor & Destructor Documentation

◆ ANCHOR()

GRID_HELPER::ANCHOR::ANCHOR ( VECTOR2I  aPos,
int  aFlags = CORNER | SNAPPABLE,
EDA_ITEM aItem = NULL 
)
inline

Definition at line 90 of file grid_helper.h.

90  :
91  pos( aPos ),
92  flags( aFlags ),
93  item( aItem )
94  { };

Member Function Documentation

◆ Distance()

double GRID_HELPER::ANCHOR::Distance ( const VECTOR2I aP) const
inline

Definition at line 100 of file grid_helper.h.

101  {
102  return ( aP - pos ).EuclideanNorm();
103  }

References pos.

Referenced by PCB_GRID_HELPER::BestDragOrigin(), EE_GRID_HELPER::BestDragOrigin(), EE_GRID_HELPER::BestSnapAnchor(), and PCB_GRID_HELPER::BestSnapAnchor().

Member Data Documentation

◆ flags

int GRID_HELPER::ANCHOR::flags

Definition at line 97 of file grid_helper.h.

◆ item

EDA_ITEM* GRID_HELPER::ANCHOR::item

Definition at line 98 of file grid_helper.h.

Referenced by PCB_GRID_HELPER::GetSnapped(), and EE_GRID_HELPER::GetSnapped().

◆ pos


The documentation for this struct was generated from the following file: