diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2012-12-21 08:33:52 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Cenoz <jtx@jtx.marker.es> | 2012-12-21 08:33:52 +0000 |
| commit | e6d37f6e87aad1a48740c7096408e2457d3527a1 (patch) | |
| tree | 2c87add33f76e353e66dd954a396b7e65eccd4f4 /src/pencil-context.cpp | |
| parent | merge from brach (diff) | |
| download | inkscape-e6d37f6e87aad1a48740c7096408e2457d3527a1.tar.gz inkscape-e6d37f6e87aad1a48740c7096408e2457d3527a1.zip | |
not working
(bzr r11950.1.3)
Diffstat (limited to 'src/pencil-context.cpp')
| -rw-r--r-- | src/pencil-context.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index 19a040b24..32248d9b6 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -780,7 +780,14 @@ interpolate(SPPencilContext *pc) /* Fit and draw and reset state */ pc->green_curve->moveto(b[0]); for (int c = 0; c < n_segs; c++) { - pc->green_curve->curveto(b[4*c+1], b[4*c+2], b[4*c+3]); + //BSpline + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + guint mode = prefs->getInt("/tools/freehand/pencil/freehand-mode", 0); + if(mode == 2){ + pc->green_curve->lineto(b[4*c+3]); + }else{ + pc->green_curve->curveto(b[4*c+1], b[4*c+2], b[4*c+3]); + } } sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(pc->red_bpath), pc->green_curve); @@ -920,7 +927,15 @@ fit_and_split(SPPencilContext *pc) /* Fit and draw and reset state */ pc->red_curve->reset(); pc->red_curve->moveto(b[0]); - pc->red_curve->curveto(b[1], b[2], b[3]); + //BSpline + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + guint mode = prefs->getInt("/tools/freehand/pencil/freehand-mode", 0); + if(mode == 2){ + pc->red_curve->lineto(b[3]); + }else{ + pc->red_curve->curveto(b[1], b[2], b[3]); + } + //BSpline End sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(pc->red_bpath), pc->red_curve); pc->red_curve_is_valid = true; } else { |
