diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2016-02-28 00:22:42 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2016-02-28 10:34:05 +0000 |
commit | 74040d447912eff5f7366b8ae61244ad101000dc (patch) | |
tree | e101a83c536472f1a99c302cbd0bbd0621c84b2a | |
parent | 728c9ce48d4e84a6b44d7d50258936f5da34cea4 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | svgio/source/svgreader/svglinenode.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/svgio/source/svgreader/svglinenode.cxx b/svgio/source/svgreader/svglinenode.cxx index 6d184807702a..b63fd8fa9768 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()); } } } |