KiCad PCB EDA Suite
GRID_HELPER::ANCHOR Struct Reference

Public Member Functions

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

Public Attributes

VECTOR2I pos
 
int flags
 
BOARD_ITEMitem
 

Detailed Description

Definition at line 69 of file grid_helper.h.

Constructor & Destructor Documentation

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

Definition at line 71 of file grid_helper.h.

71  :
72  pos( aPos ), flags( aFlags ), item( aItem ) {} ;
BOARD_ITEM * item
Definition: grid_helper.h:76

Member Function Documentation

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

Definition at line 78 of file grid_helper.h.

Referenced by GRID_HELPER::BestDragOrigin(), and GRID_HELPER::BestSnapAnchor().

79  {
80  return ( aP - pos ).EuclideanNorm();
81  }

Member Data Documentation

int GRID_HELPER::ANCHOR::flags

Definition at line 75 of file grid_helper.h.

BOARD_ITEM* GRID_HELPER::ANCHOR::item

Definition at line 76 of file grid_helper.h.

VECTOR2I GRID_HELPER::ANCHOR::pos

Definition at line 72 of file grid_helper.h.

Referenced by GRID_HELPER::BestDragOrigin(), and GRID_HELPER::BestSnapAnchor().


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