summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2007-03-18 12:01:08 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2007-03-18 12:01:08 +0000
commite1bf61427785324fec773caa082e92d328efe392 (patch)
tree86c0786ce193a54083ab6df8a383d92e1888c93e /src
parentSnap while dragging knots, for rect and arc (diff)
downloadinkscape-e1bf61427785324fec773caa082e92d328efe392.tar.gz
inkscape-e1bf61427785324fec773caa082e92d328efe392.zip
Snap while dragging knots, for star
(bzr r2692)
Diffstat (limited to 'src')
-rw-r--r--src/object-edit.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/object-edit.cpp b/src/object-edit.cpp
index fefdc8791..14539417b 100644
--- a/src/object-edit.cpp
+++ b/src/object-edit.cpp
@@ -708,8 +708,10 @@ static void
sp_star_knot1_set(SPItem *item, NR::Point const &p, NR::Point const &origin, guint state)
{
SPStar *star = SP_STAR(item);
+
+ NR::Point const s = snap_knot_position(star, p);
- NR::Point d = p - star->center;
+ NR::Point d = s - star->center;
double arg1 = atan2(d);
double darg1 = arg1 - star->arg[0];
@@ -732,8 +734,11 @@ static void
sp_star_knot2_set(SPItem *item, NR::Point const &p, NR::Point const &origin, guint state)
{
SPStar *star = SP_STAR(item);
+
+ NR::Point const s = snap_knot_position(star, p);
+
if (star->flatsided == false) {
- NR::Point d = p - star->center;
+ NR::Point d = s - star->center;
double arg1 = atan2(d);
double darg1 = arg1 - star->arg[1];