Module snap
Expand description
Snapping: what is dragged lands on the edges and centres of other boxes, and a guide shows what it lined up with.
Structs§
- Guide
- A line something snapped to:
x = atfromy = fromtotowhenvertical, elsey = atfromx = fromtoto. - Snap
- How far to shift what is dragged, and the guides it then lines up with.
Functions§
- snap_
point - Snap one point (a corner being dragged, a new shape’s corner) onto
targets’ edges and centres. - snap_
rect - Snap a box being moved onto
targets’ edges and centres, each axis on its own, withintoleranceunits.