ipe::Snap Class Reference
[Ipe Utilities]
Performs snapping operations, and stores snapping state.
More...
#include <ipesnap.h>
List of all members.
Public Types
- enum TSnapModes {
ESnapNone = 0,
ESnapVtx = 1,
ESnapBd = 2,
ESnapInt = 4,
ESnapGrid = 8,
ESnapAngle = 0x10,
ESnapAuto = 0x20
}
Public Member Functions
- bool intersectionSnap (Vector &pos, const Page *page, double snapDist) const
- bool snapAngularIntersection (Vector &pos, const Line &l, const Page *page, double snapDist) const
- bool simpleSnap (Vector &pos, const Page *page, double snapDist) const
- bool snap (Vector &pos, const Page *page, double snapDist, Vector *autoOrg=0) const
- Line getLine (const Vector &mouse, const Vector &base) const
- bool setEdge (const Vector &pos, const Page *page)
Public Attributes
Detailed Description
Performs snapping operations, and stores snapping state.
Member Enumeration Documentation
The different snap modes as bitmasks.
- Enumerator:
-
ESnapNone |
|
ESnapVtx |
|
ESnapBd |
|
ESnapInt |
|
ESnapGrid |
|
ESnapAngle |
|
ESnapAuto |
|
Member Function Documentation
bool Snap::intersectionSnap |
( |
Vector & |
pos, |
|
|
const Page * |
page, |
|
|
double |
snapDist | |
|
) |
| | const |
Perform intersection snapping.
bool Snap::snapAngularIntersection |
( |
Vector & |
pos, |
|
|
const Line & |
l, |
|
|
const Page * |
page, |
|
|
double |
snapDist | |
|
) |
| | const |
Perform snapping to intersection of angular line and pos.
bool Snap::simpleSnap |
( |
Vector & |
pos, |
|
|
const Page * |
page, |
|
|
double |
snapDist | |
|
) |
| | const |
Tries vertex, intersection, boundary, and grid snapping.
If snapping occurred, pos is set to the new user space position.
bool Snap::snap |
( |
Vector & |
pos, |
|
|
const Page * |
page, |
|
|
double |
snapDist, |
|
|
Vector * |
autoOrg = 0 | |
|
) |
| | const |
Performs snapping of position pos.
Returns true
if snapping occurred. In that case pos is set to the new user space position.
Automatic angular snapping occurs if autoOrg is not null --- the value is then used as the origin for automatic angular snapping.
Find line through base with slope determined by angular snap size and direction.
bool Snap::setEdge |
( |
const Vector & |
pos, |
|
|
const Page * |
page | |
|
) |
| | |
Set axis origin and direction from edge near mouse.
Returns true
if successful.
Member Data Documentation
Activated snapping modes (TSnapModes).
Angle for angular snapping.
Snap distance (in pixels).
Origin of coordinate system.
The documentation for this class was generated from the following files: