snap-enums.h revision 727eeb2592befe925906eb7605e9ed770697162b
#ifndef SNAPENUMS_H_
#define SNAPENUMS_H_
/**
* \file snap-enums.h
* \brief enumerations of snap source types and snap target types
*
* Authors:
* Diederik van Lierop <mail@diedenrezi.nl>
*
* Copyright (C) 2010 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
enum SnapSourceType {
SNAPSOURCE_UNDEFINED = 0,
//-------------------------------------------------------------------
// Bbox points can be located at the edge of the stroke (for visual bboxes); they will therefore not snap
// to nodes because these are always located at the center of the stroke
SNAPSOURCE_BBOX_CATEGORY = 16, // will be used as a flag and must therefore be a power of two. Also,
// must be larger than the largest number of targets in a single group
//-------------------------------------------------------------------
// For the same reason, nodes will not snap to bbox points
SNAPSOURCE_NODE_SMOOTH, // Symmetrical nodes are also considered to be smooth; there's no dedicated type for symm. nodes
SNAPSOURCE_RECT_CORNER, // of a rectangle, so at the center of the stroke
SNAPSOURCE_NODE_HANDLE, // eg. nodes in the path editor, handles of stars or rectangles, etc. (tied to a stroke)
//-------------------------------------------------------------------
// Other points (e.g. guides) will snap to both bounding boxes and nodes
//-------------------------------------------------------------------
// Other points (e.g. gradient knots, image corners) will snap to both bounding boxes and nodes
SNAPSOURCE_OBJECT_MIDPOINT, // midpoint of rectangles, ellipses, polygon, etc.
SNAPSOURCE_OTHER_HANDLE, // eg. the handle of a gradient or of a connector (ie not being tied to a stroke)
SNAPSOURCE_GRID_PITCH, // eg. when pasting or alt-dragging in the selector tool; not realy a snap source
};
enum SnapTargetType {
SNAPTARGET_UNDEFINED = 0,
//-------------------------------------------------------------------
SNAPTARGET_BBOX_CATEGORY = 16, // will be used as a flag and must therefore be a power of two. Also,
// must be larger than the largest number of targets in a single group
// i.e > 15 because that's the number of targets in the "others" group
//-------------------------------------------------------------------
SNAPTARGET_ELLIPSE_QUADRANT_POINT, // this corner is at the center of the stroke
SNAPTARGET_RECT_CORNER, // of a rectangle, so this corner is at the center of the stroke
//-------------------------------------------------------------------
//-------------------------------------------------------------------
//-------------------------------------------------------------------
};
}
#endif /* SNAPENUMS_H_ */