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 106 of file grid_helper.h.

Constructor & Destructor Documentation

◆ ANCHOR()

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

Definition at line 108 of file grid_helper.h.

108  :
109  pos( aPos ),
110  flags( aFlags ),
111  item( aItem )
112  { };
BOARD_ITEM * item
Definition: grid_helper.h:116

Member Function Documentation

◆ Distance()

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

Definition at line 118 of file grid_helper.h.

119  {
120  return ( aP - pos ).EuclideanNorm();
121  }

References pos.

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

Member Data Documentation

◆ flags

int GRID_HELPER::ANCHOR::flags

Definition at line 115 of file grid_helper.h.

◆ item

BOARD_ITEM* GRID_HELPER::ANCHOR::item

Definition at line 116 of file grid_helper.h.

Referenced by GRID_HELPER::GetSnapped().

◆ pos

VECTOR2I GRID_HELPER::ANCHOR::pos

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