diff options
| author | MenTaLguY <mental@rydia.net> | 2006-09-04 04:15:34 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-09-04 04:15:34 +0000 |
| commit | dc7ebd6a0ff01536bef1fa1b38613b6351e4eca1 (patch) | |
| tree | d184dc8a496771d963ac2773bb2cd1788e125732 /src/dyna-draw-context.cpp | |
| parent | reduce epsilon a little bit (diff) | |
| download | inkscape-dc7ebd6a0ff01536bef1fa1b38613b6351e4eca1.tar.gz inkscape-dc7ebd6a0ff01536bef1fa1b38613b6351e4eca1.zip | |
add rounded caps to temporary shapes as well
(bzr r1675)
Diffstat (limited to 'src/dyna-draw-context.cpp')
| -rw-r--r-- | src/dyna-draw-context.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dyna-draw-context.cpp b/src/dyna-draw-context.cpp index 04378849e..f9c5dcac1 100644 --- a/src/dyna-draw-context.cpp +++ b/src/dyna-draw-context.cpp @@ -73,6 +73,7 @@ static gint sp_dyna_draw_context_root_handler(SPEventContext *ec, GdkEvent *even static void clear_current(SPDynaDrawContext *dc); static void set_to_accumulated(SPDynaDrawContext *dc); +static void add_cap(SPCurve *curve, NR::Point const &from, NR::Point const &to, double rounding); static void accumulate_calligraphic(SPDynaDrawContext *dc); static void fit_and_split(SPDynaDrawContext *ddc, gboolean release); @@ -796,6 +797,9 @@ fit_and_split_calligraphics(SPDynaDrawContext *dc, gboolean release) for (NR::Point *bp2 = b2 + BEZIER_SIZE * ( nb2 - 1 ); bp2 >= b2; bp2 -= BEZIER_SIZE) { sp_curve_curveto(dc->currentcurve, bp2[2], bp2[1], bp2[0]); } + if (!dc->segments) { + add_cap(dc->currentcurve, b2[0], b1[0], dc->cap_rounding); + } sp_curve_closepath(dc->currentcurve); sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(dc->currentshape), dc->currentcurve); } @@ -870,6 +874,7 @@ draw_temporary_box(SPDynaDrawContext *dc) for (gint i = dc->npoints-1; i >= 0; i--) { sp_curve_lineto(dc->currentcurve, dc->point2[i]); } + add_cap(dc->currentcurve, dc->point2[0], dc->point1[0], dc->cap_rounding); sp_curve_closepath(dc->currentcurve); sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(dc->currentshape), dc->currentcurve); } |
