summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/path-manipulator.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-08-04 09:21:54 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-08-04 09:21:54 +0000
commitb2842360758b2333a651ef9932c1e438e90628e3 (patch)
treecde6a1848389e11a6f23fb0b54015151c093d2d9 /src/ui/tool/path-manipulator.cpp
parentFix type in 'mix-blend-mode'. (diff)
downloadinkscape-b2842360758b2333a651ef9932c1e438e90628e3.tar.gz
inkscape-b2842360758b2333a651ef9932c1e438e90628e3.zip
Fixed some redraw problems moving nodes in bspline mode
(bzr r13341.1.115)
Diffstat (limited to 'src/ui/tool/path-manipulator.cpp')
-rw-r--r--src/ui/tool/path-manipulator.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp
index 01cff5ad7..9839be437 100644
--- a/src/ui/tool/path-manipulator.cpp
+++ b/src/ui/tool/path-manipulator.cpp
@@ -1219,6 +1219,7 @@ double PathManipulator::BSplineHandlePosition(Handle *h, Handle *h2){
h = h2;
}
double pos = 0.0000;
+ const double handleCubicGap = 0.01;
Node *n = h->parent();
Node * nextNode = NULL;
nextNode = n->nodeToward(h);
@@ -1226,7 +1227,7 @@ double PathManipulator::BSplineHandlePosition(Handle *h, Handle *h2){
SPCurve *lineInsideNodes = new SPCurve();
lineInsideNodes->moveto(n->position());
lineInsideNodes->lineto(nextNode->position());
- pos = Geom::nearest_point(h->position(),*lineInsideNodes->first_segment());
+ pos = Geom::nearest_point(Geom::Point(h->position()[X] - handleCubicGap,h->position()[Y] - handleCubicGap),*lineInsideNodes->first_segment());
}
if (pos == 0.0000 && !h2){
return BSplineHandlePosition(h, h->other());
@@ -1244,6 +1245,7 @@ Geom::Point PathManipulator::BSplineHandleReposition(Handle *h, Handle *h2){
Geom::Point PathManipulator::BSplineHandleReposition(Handle *h,double pos){
using Geom::X;
using Geom::Y;
+ const double handleCubicGap = 0.01;
Geom::Point ret = h->position();
Node *n = h->parent();
Geom::D2< Geom::SBasis > SBasisInsideNodes;
@@ -1255,7 +1257,7 @@ Geom::Point PathManipulator::BSplineHandleReposition(Handle *h,double pos){
lineInsideNodes->lineto(nextNode->position());
SBasisInsideNodes = lineInsideNodes->first_segment()->toSBasis();
ret = SBasisInsideNodes.valueAt(pos);
- ret = Geom::Point(ret[X] + 0.005,ret[Y] + 0.005);
+ ret = Geom::Point(ret[X] + handleCubicGap,ret[Y] + handleCubicGap);
}else{
if(pos == 0.0000){
ret = n->position();