diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-07-09 20:42:20 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-07-09 20:42:20 +0200 |
commit | b49fb988a458c84869abc30376def886d4d3cc7f (patch) | |
tree | 68e43355a232a92e02cb1d9a476dca7d2bb6cd37 | |
parent | 29d671d0cd7a1b777d9c5172c5794d59b8048402 (diff) |
Don't add a trailing M-segment when emulating NURBS by curves
-rw-r--r-- | src/lib/VSDContentCollector.cpp | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp index 0217597..4edffb3 100644 --- a/src/lib/VSDContentCollector.cpp +++ b/src/lib/VSDContentCollector.cpp @@ -1319,17 +1319,6 @@ void libvisio::VSDContentCollector::_generateCubicBeziersFromNURBS(const std::ve WPXPropertyList node; - node.insert("libwpg:path-action", "M"); - double x = controlPoints[0].first; - double y = controlPoints[0].second; - transformPoint(x,y); - node.insert("svg:x", m_scale*x); - node.insert("svg:y", m_scale*y); - if (!m_noFill && !m_noShow) - m_currentFillGeometry.push_back(node); - if (!m_noLine && !m_noShow) - m_currentLineGeometry.push_back(node); - /* Decomposition of a spline of 3rd degree into Bezier segments * adapted from the algorithm DecomposeCurve (Les Piegl, Wayne Tiller: * The NURBS Book, 2nd Edition, 1997 @@ -1377,8 +1366,8 @@ void libvisio::VSDContentCollector::_generateCubicBeziersFromNURBS(const std::ve node.clear(); node.insert("libwpg:path-action", "C"); - x = Qw[1].first; - y = Qw[1].second; + double x = Qw[1].first; + double y = Qw[1].second; transformPoint(x, y); node.insert("svg:x1", m_scale*x); node.insert("svg:y1", m_scale*y); @@ -1427,18 +1416,6 @@ void libvisio::VSDContentCollector::_generateQuadraticBeziersFromNURBS(const std WPXPropertyList node; - node.insert("libwpg:path-action", "M"); - double x = controlPoints[0].first; - double y = controlPoints[0].second; - transformPoint(x,y); - node.insert("svg:x", m_scale*x); - node.insert("svg:y", m_scale*y); - if (!m_noFill && !m_noShow) - m_currentFillGeometry.push_back(node); - if (!m_noLine && !m_noShow) - m_currentLineGeometry.push_back(node); - - /* Decomposition of a spline of 2nd degree into Bezier segments * adapted from the algorithm DecomposeCurve (Les Piegl, Wayne Tiller: * The NURBS Book, 2nd Edition, 1997 @@ -1486,8 +1463,8 @@ void libvisio::VSDContentCollector::_generateQuadraticBeziersFromNURBS(const std node.clear(); node.insert("libwpg:path-action", "Q"); - x = Qw[1].first; - y = Qw[1].second; + double x = Qw[1].first; + double y = Qw[1].second; transformPoint(x, y); node.insert("svg:x1", m_scale*x); node.insert("svg:y1", m_scale*y); |