diff options
author | Armin Le Grand <alg@apache.org> | 2013-04-24 16:26:20 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-17 13:50:32 +0100 |
commit | 64aed8554510ec3c288ccc247701cf048df59860 (patch) | |
tree | 105ad52d0ed0253562afeba3a0355dfbe1e31df2 /drawinglayer | |
parent | d7cebf0f211053960fba5c0bf1179df54fd35456 (diff) |
Resolves: #i122132# Some simple extensions to exporter
(cherry picked from commit 3454d18694e0ddcf9bc71661bf48c37450fa1fab)
Conflicts:
filter/source/svg/svgwriter.cxx
Change-Id: I2f9d96ffce0d51695a665b58a776807bab5d277e
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 59080d3c7ad9..83238c0bce97 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -402,6 +402,7 @@ namespace drawinglayer if(rB2DPolygon.count() && !mnSvtGraphicStrokeCount) { + basegfx::B2DPolygon aLocalPolygon(rB2DPolygon); basegfx::BColor aStrokeColor; basegfx::B2DPolyPolygon aStartArrow; basegfx::B2DPolyPolygon aEndArrow; @@ -419,29 +420,37 @@ namespace drawinglayer // SvtGraphicStroke has NO entry for stroke color(!) mpOutputDevice->SetLineColor(Color(aStrokeColor)); - if(!rB2DPolygon.isClosed()) + if(!aLocalPolygon.isClosed()) { double fPolyLength(0.0); + double fStart(0.0); + double fEnd(0.0); if(pStart && pStart->isActive()) { - fPolyLength = basegfx::tools::getLength(rB2DPolygon); + fPolyLength = basegfx::tools::getLength(aLocalPolygon); aStartArrow = basegfx::tools::createAreaGeometryForLineStartEnd( - rB2DPolygon, pStart->getB2DPolyPolygon(), true, pStart->getWidth(), - fPolyLength, pStart->isCentered() ? 0.5 : 0.0, 0); + aLocalPolygon, pStart->getB2DPolyPolygon(), true, pStart->getWidth(), + fPolyLength, pStart->isCentered() ? 0.5 : 0.0, &fStart); } if(pEnd && pEnd->isActive()) { if(basegfx::fTools::equalZero(fPolyLength)) { - fPolyLength = basegfx::tools::getLength(rB2DPolygon); + fPolyLength = basegfx::tools::getLength(aLocalPolygon); } aEndArrow = basegfx::tools::createAreaGeometryForLineStartEnd( - rB2DPolygon, pEnd->getB2DPolyPolygon(), false, pEnd->getWidth(), - fPolyLength, pEnd->isCentered() ? 0.5 : 0.0, 0); + aLocalPolygon, pEnd->getB2DPolyPolygon(), false, pEnd->getWidth(), + fPolyLength, pEnd->isCentered() ? 0.5 : 0.0, &fEnd); + } + + if(0.0 != fStart || 0.0 != fEnd) + { + // build new poly, consume something from old poly + aLocalPolygon = basegfx::tools::getSnippetAbsolute(aLocalPolygon, fStart, fPolyLength - fEnd, fPolyLength); } } @@ -517,14 +526,12 @@ namespace drawinglayer // concept of PDF export and SvtGraphicStroke usage does simply not // allow handling such definitions. The only clean way would be to // add the transformation to SvtGraphicStroke and to handle it there - basegfx::B2DPolygon aB2DPolygon(rB2DPolygon); - - aB2DPolygon.transform(maCurrentTransformation); + aLocalPolygon.transform(maCurrentTransformation); aStartArrow.transform(maCurrentTransformation); aEndArrow.transform(maCurrentTransformation); pRetval = new SvtGraphicStroke( - Polygon(aB2DPolygon), + Polygon(aLocalPolygon), PolyPolygon(aStartArrow), PolyPolygon(aEndArrow), mfCurrentUnifiedTransparence, |