diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-06-06 01:43:35 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-06-06 01:43:35 +0000 |
| commit | 8a38c52bce619b07117cdd87a183eb05fb51e28e (patch) | |
| tree | 39b9f2af1ce9df43884a3b33ca2445097fe8f5a5 /src/pen-context.cpp | |
| parent | oops. sys/wait.h not on win32 (diff) | |
| download | inkscape-8a38c52bce619b07117cdd87a183eb05fb51e28e.tar.gz inkscape-8a38c52bce619b07117cdd87a183eb05fb51e28e.zip | |
merge gsoc2008_johan_path2geom into trunk
(bzr r5823)
Diffstat (limited to 'src/pen-context.cpp')
| -rw-r--r-- | src/pen-context.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/pen-context.cpp b/src/pen-context.cpp index 8d7ac0819..7dc489540 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -806,7 +806,7 @@ pen_redraw_all (SPPenContext *const pc) sp_canvas_item_hide (pc->cl1); } - NArtBpath *const bpath = pc->green_curve->last_bpath(); + NArtBpath const * bpath = pc->green_curve->last_bpath(); if (bpath) { if (bpath->code == NR_CURVETO && NR::Point(bpath->x2, bpath->y2) != pc->p[0]) { SP_CTRL(pc->c0)->moveto(NR::Point(bpath->x2, bpath->y2)); @@ -827,14 +827,9 @@ pen_lastpoint_move (SPPenContext *const pc, gdouble x, gdouble y) return; // green - NArtBpath *const bpath = pc->green_curve->last_bpath(); + NArtBpath const * bpath = pc->green_curve->last_bpath(); if (bpath) { - if (bpath->code == NR_CURVETO) { - bpath->x2 += x; - bpath->y2 += y; - } - bpath->x3 += x; - bpath->y3 += y; + pc->green_curve->last_point_additive_move( Geom::Point(x,y) ); } else { // start anchor too if (pc->green_anchor) { @@ -861,7 +856,7 @@ pen_lastpoint_tocurve (SPPenContext *const pc) return; // red - NArtBpath *const bpath = pc->green_curve->last_bpath(); + NArtBpath const * bpath = pc->green_curve->last_bpath(); if (bpath && bpath->code == NR_CURVETO) { pc->p[1] = pc->p[0] + (NR::Point(bpath->x3, bpath->y3) - NR::Point(bpath->x2, bpath->y2)); } else { |
