svgio/source/svgreader/svglinenode.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
New commits: commit 74040d447912eff5f7366b8ae61244ad101000dc Author: Regina Henschel <[email protected]> Date: Sun Feb 28 00:22:42 2016 +0100 tdf#98119 Allow markers on zero-length lines Inkscape, Seamonkey, Chrome and Batik show markers on zero- length lines, LibreOffice should do that too. The patch removes the restriction start<>end. Change-Id: I984baf755df7b2689e00d2a23b40e3f059c0add0 Reviewed-on: https://gerrit.libreoffice.org/22740 Tested-by: Jenkins <[email protected]> Reviewed-by: Thorsten Behrens <[email protected]> diff --git a/svgio/source/svgreader/svglinenode.cxx b/svgio/source/svgreader/svglinenode.cxx index 6d18480..b63fd8f 100644 --- a/svgio/source/svgreader/svglinenode.cxx +++ b/svgio/source/svgreader/svglinenode.cxx @@ -134,21 +134,21 @@ namespace svgio getX2().isSet() ? getX2().solve(*this, xcoordinate) : 0.0, getY2().isSet() ? getY2().solve(*this, ycoordinate) : 0.0); - if(!X.equal(Y)) - { - basegfx::B2DPolygon aPath; + // X and Y may be equal, do not drop them. Markers or linecaps 'round' and 'square' + // need to be drawn for zero-length lines too. - aPath.append(X); - aPath.append(Y); + basegfx::B2DPolygon aPath; - drawinglayer::primitive2d::Primitive2DContainer aNewTarget; + aPath.append(X); + aPath.append(Y); - pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, nullptr); + drawinglayer::primitive2d::Primitive2DContainer aNewTarget; - if(!aNewTarget.empty()) - { - pStyle->add_postProcess(rTarget, aNewTarget, getTransform()); - } + pStyle->add_path(basegfx::B2DPolyPolygon(aPath), aNewTarget, nullptr); + + if(!aNewTarget.empty()) + { + pStyle->add_postProcess(rTarget, aNewTarget, getTransform()); } } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
