summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-03-23 19:09:28 +0000
committerJabiertxo Arraiza Zenotz <jtx@jtx.marker.es>2013-03-23 19:09:28 +0000
commit37d99686ec9b0a49c1ef07483967571da674e65e (patch)
tree37a9f2546125d02f58b343b55e6db57124099baa /src
parentRemove extra code (diff)
downloadinkscape-37d99686ec9b0a49c1ef07483967571da674e65e.tar.gz
inkscape-37d99686ec9b0a49c1ef07483967571da674e65e.zip
Fix weight 0 by widget now give a full cusp node
(bzr r11950.1.70)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-bspline.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/live_effects/lpe-bspline.cpp b/src/live_effects/lpe-bspline.cpp
index 0a13c17b2..ee771a54e 100644
--- a/src/live_effects/lpe-bspline.cpp
+++ b/src/live_effects/lpe-bspline.cpp
@@ -399,20 +399,20 @@ LPEBSpline::doBSplineFromWidget(SPCurve * curve, double weightValue , bool ignor
pointAt0 = in->first_segment()->initialPoint();
SBasisIn = in->first_segment()->toSBasis();
if(cubic){
- if(!ignoreCusp || !Geom::are_near((*cubic)[1],in->first_segment()->initialPoint())){
+ if((!ignoreCusp || !Geom::are_near((*cubic)[1],in->first_segment()->initialPoint())) && weightValue !=0){
pointAt1 = SBasisIn.valueAt(weightValue);
pointAt1 = Geom::Point(pointAt1[X] + 0.0625,pointAt1[Y] + 0.0625);
}else{
pointAt1 = in->first_segment()->initialPoint();
}
- if(!ignoreCusp || !Geom::are_near((*cubic)[2],in->first_segment()->finalPoint())){
+ if((!ignoreCusp || !Geom::are_near((*cubic)[2],in->first_segment()->finalPoint())) && weightValue !=0){
pointAt2 = SBasisIn.valueAt(1-weightValue);
pointAt2 = Geom::Point(pointAt2[X] + 0.0625,pointAt2[Y] + 0.0625);
}else{
pointAt2 = in->first_segment()->finalPoint();
}
}else{
- if(!ignoreCusp){
+ if(!ignoreCusp && weightValue !=0){
pointAt1 = SBasisIn.valueAt(weightValue);
pointAt1 = Geom::Point(pointAt1[X] + 0.0625,pointAt1[Y] + 0.0625);
pointAt2 = SBasisIn.valueAt(1-weightValue);
@@ -433,20 +433,20 @@ LPEBSpline::doBSplineFromWidget(SPCurve * curve, double weightValue , bool ignor
SBasisOut = out->first_segment()->toSBasis();
cubic = dynamic_cast<Geom::CubicBezier const*>(&*curve_it2);
if(cubic){
- if(!ignoreCusp || !Geom::are_near((*cubic)[1],out->first_segment()->initialPoint())){
+ if((!ignoreCusp || !Geom::are_near((*cubic)[1],out->first_segment()->initialPoint()))&& weightValue !=0){
nextPointAt1 = SBasisOut.valueAt(weightValue);
nextPointAt1 = Geom::Point(nextPointAt1[X] + 0.0625,nextPointAt1[Y] + 0.0625);
}else{
nextPointAt1 = out->first_segment()->initialPoint();
}
- if(!ignoreCusp || !Geom::are_near((*cubic)[2],out->first_segment()->finalPoint())){
+ if((!ignoreCusp || !Geom::are_near((*cubic)[2],out->first_segment()->finalPoint()))&& weightValue !=0){
nextPointAt2 = SBasisOut.valueAt(1-weightValue);
nextPointAt2 = Geom::Point(nextPointAt2[X] + 0.0625,nextPointAt2[Y] + 0.0625);
}else{
nextPointAt2 = out->first_segment()->finalPoint();
}
}else{
- if(!ignoreCusp){
+ if(!ignoreCusp && weightValue !=0){
nextPointAt1 = SBasisOut.valueAt(weightValue);
nextPointAt1 = Geom::Point(nextPointAt1[X] + 0.0625,nextPointAt1[Y] + 0.0625);
nextPointAt2 = SBasisOut.valueAt(1-weightValue);