summaryrefslogtreecommitdiffstats
path: root/src/pencil-context.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-03-19 09:38:56 +0000
committerJabiertxo Arraiza Zenotz <jtx@jtx.marker.es>2013-03-19 09:38:56 +0000
commit757f1b17bf5db6b7b5cc8725a0ee3c438c08cafc (patch)
treec62786af287828f0f70dba2e079be3cea604d8f4 /src/pencil-context.cpp
parentWorking width widgets (diff)
parentDrop remaining unused functions (diff)
downloadinkscape-757f1b17bf5db6b7b5cc8725a0ee3c438c08cafc.tar.gz
inkscape-757f1b17bf5db6b7b5cc8725a0ee3c438c08cafc.zip
Widgets to effect added
(bzr r11950.1.59)
Diffstat (limited to 'src/pencil-context.cpp')
-rw-r--r--src/pencil-context.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp
index 37df2588a..a7fa5e111 100644
--- a/src/pencil-context.cpp
+++ b/src/pencil-context.cpp
@@ -722,6 +722,11 @@ interpolate(SPPencilContext *pc)
return;
}
+ //BSpline
+ using Geom::X;
+ using Geom::Y;
+ //BSpline end
+
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
double const tol = prefs->getDoubleLimited("/tools/freehand/pencil/tolerance", 10.0, 1.0, 100.0) * 0.4;
double const tolerance_sq = 0.02 * square( pc->desktop->w2d().descrim() *
@@ -761,7 +766,9 @@ interpolate(SPPencilContext *pc)
//Si el modo es BSpline modificamos para que el trazado cree los nodos adhoc
if(mode == 2){
Geom::Point BP = b[4*c+0] + (1./3)*(b[4*c+3] - b[4*c+0]);
+ BP = Geom::Point(BP[X] + 0.0625,BP[Y] + 0.0625);
Geom::Point CP = b[4*c+3] + (1./3)*(b[4*c+0] - b[4*c+3]);
+ CP = Geom::Point(CP[X] + 0.0625,CP[Y] + 0.0625);
pc->green_curve->curveto(BP,CP,b[4*c+3]);
}else{
pc->green_curve->curveto(b[4*c+1], b[4*c+2], b[4*c+3]);
@@ -908,12 +915,16 @@ fit_and_split(SPPencilContext *pc)
pc->red_curve->reset();
pc->red_curve->moveto(b[0]);
//BSpline
+ using Geom::X;
+ using Geom::Y;
//Si el modo es BSpline modificamos para que el trazado cree los nodos adhoc
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
guint mode = prefs->getInt("/tools/freehand/pencil/freehand-mode", 0);
if(mode == 2){
Geom::Point B = b[0] + (1./3)*(b[3] - b[0]);
+ B = Geom::Point(B[X] + 0.0625,B[Y] + 0.0625);
Geom::Point C = b[3] + (1./3)*(b[0] - b[3]);
+ C = Geom::Point(C[X] + 0.0625,C[Y] + 0.0625);
pc->red_curve->curveto(B,C,b[3]);
}else{
pc->red_curve->curveto(b[1], b[2], b[3]);