diff options
| author | bulia byak <buliabyak@gmail.com> | 2008-03-18 04:53:42 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2008-03-18 04:53:42 +0000 |
| commit | b555f4f62c62c7d5b2bab05d4b56ad068537c9f4 (patch) | |
| tree | a683e43ff1d65eea28738c6016243283266739eb /src/svg/svg-path.cpp | |
| parent | A fix for bug #199357 "cannot load emf file" based on the patch submitted by ... (diff) | |
| download | inkscape-b555f4f62c62c7d5b2bab05d4b56ad068537c9f4.tar.gz inkscape-b555f4f62c62c7d5b2bab05d4b56ad068537c9f4.zip | |
patch by Jasper for optimizing path data
(bzr r5110)
Diffstat (limited to 'src/svg/svg-path.cpp')
| -rw-r--r-- | src/svg/svg-path.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/svg/svg-path.cpp b/src/svg/svg-path.cpp index 0239d2ae0..30b259fa8 100644 --- a/src/svg/svg-path.cpp +++ b/src/svg/svg-path.cpp @@ -664,7 +664,9 @@ gchar *sp_svg_write_path(NArtBpath const *bpath) for (int i = 0; bpath[i].code != NR_END; i++){ switch (bpath [i].code){ case NR_LINETO: - str.lineTo(bpath[i].x3, bpath[i].y3); + if (!closed || bpath[i+1].code == NR_LINETO || bpath[i+1].code == NR_CURVETO) { + str.lineTo(bpath[i].x3, bpath[i].y3); + } break; case NR_CURVETO: |
