From f0c8d6ccf3bb136f2e417ba468aad0969f48fcde Mon Sep 17 00:00:00 2001 From: dvlierop2 Date: Sun, 18 Mar 2007 12:01:08 +0000 Subject: [PATCH] Snap while dragging knots, for star --- src/object-edit.cpp | 9 +++++++-- 1 file 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]; -- 2.30.2