diff --git a/src/snap-preferences.h b/src/snap-preferences.h
index 97ef3cec210081653894a629c926bf953e0bed4c..63d7fba15215bffbbf26ac60d7e2f4ff91ff08b4 100644 (file)
--- a/src/snap-preferences.h
+++ b/src/snap-preferences.h
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include "helper/units.h"
+
namespace Inkscape
{
bool getSnapBBoxEdgeMidpoints() const {return _bbox_edge_midpoints;}
bool getSnapBBoxMidpoints() const {return _bbox_midpoints;}
+ void setSnapToGrids(bool enabled) {_snap_to_grids = enabled;}
+ bool getSnapToGrids() const {return _snap_to_grids;}
+
+ void setSnapToGuides(bool enabled) {_snap_to_guides = enabled;}
+ bool getSnapToGuides() const {return _snap_to_guides;}
+
void setIncludeItemCenter(bool enabled) {_include_item_center = enabled;}
bool getIncludeItemCenter() const {return _include_item_center;}
bool getSnapToPageBorder() const {return _snap_to_page_border;}
bool getStrictSnapping() const {return _strict_snapping;}
+ gdouble getGridTolerance() const {return _grid_tolerance;}
+ gdouble getGuideTolerance() const {return _guide_tolerance;}
+ gdouble getObjectTolerance() const {return _object_tolerance;}
+
+ void setGridTolerance(gdouble val) {_grid_tolerance = val;}
+ void setGuideTolerance(gdouble val) {_guide_tolerance = val;}
+ void setObjectTolerance(gdouble val) {_object_tolerance = val;}
+
+
private:
bool _include_item_center; //If true, snapping nodes will also snap the item's center
bool _intersectionGG; //Consider snapping to intersections of grid and guides
bool _object_midpoints; // the midpoint of shapes (e.g. a circle, rect, polygon) or of any other shape (at [h/2, w/2])
bool _bbox_edge_midpoints;
bool _bbox_midpoints;
+ bool _snap_to_grids;
+ bool _snap_to_guides;
bool _snap_enabled_globally; // Toggles ALL snapping
bool _snap_postponed_globally; // Hold all snapping temporarily when the mouse is moving fast
PointType _snap_from; ///< bitmap of point types that we will snap from
//snap bbox corners to nodes, or nodes to bboxes.
//(snapping to grids and guides is not affected by this)
bool _strict_snapping;
+
+ gdouble _grid_tolerance;
+ gdouble _guide_tolerance;
+ gdouble _object_tolerance;
};
}