~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/gradient-drag.cpp

  • Committer: Diederik van Lierop
  • Date: 2009-12-24 20:10:43 UTC
  • Revision ID: diederik_van_lierop_mail_at-sign_diedenrezi_dot_nl-20091224201043-txzqbq2uvs8334ei
refactoring the snapping code (laying the groundwork for my next commit which reduces snap jitter)

Show diffs side-by-side

added added

removed removed

Lines of Context:
609
609
                dist = fabs(p[Geom::Y] - dragger->parent->hor_levels[i]);
610
610
                if (dist < snap_dist) {
611
611
                    p[Geom::Y] = dragger->parent->hor_levels[i];
612
 
                    s = Inkscape::SnappedPoint(p, Inkscape::SNAPSOURCE_HANDLE, Inkscape::SNAPTARGET_GRADIENTS_PARENT_BBOX, dist, snap_dist, false, false);
 
612
                    s = Inkscape::SnappedPoint(p, Inkscape::SNAPSOURCE_HANDLE, 0, Inkscape::SNAPTARGET_GRADIENTS_PARENT_BBOX, dist, snap_dist, false, false);
613
613
                    was_snapped = true;
614
614
                    sp_knot_moveto (knot, p);
615
615
                }
618
618
                dist = fabs(p[Geom::X] - dragger->parent->vert_levels[i]);
619
619
                if (dist < snap_dist) {
620
620
                    p[Geom::X] = dragger->parent->vert_levels[i];
621
 
                    s = Inkscape::SnappedPoint(p, Inkscape::SNAPSOURCE_HANDLE, Inkscape::SNAPTARGET_GRADIENTS_PARENT_BBOX, dist, snap_dist, false, false);
 
621
                    s = Inkscape::SnappedPoint(p, Inkscape::SNAPSOURCE_HANDLE, 0, Inkscape::SNAPTARGET_GRADIENTS_PARENT_BBOX, dist, snap_dist, false, false);
622
622
                    was_snapped = true;
623
623
                    sp_knot_moveto (knot, p);
624
624
                }