From: dvlierop2 Date: Sun, 18 Mar 2007 12:01:08 +0000 (+0000) Subject: Snap while dragging knots, for star X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f0c8d6ccf3bb136f2e417ba468aad0969f48fcde;p=inkscape.git Snap while dragging knots, for star --- 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];