summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-08-16 20:20:47 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-08-17 21:27:40 +0200
commit046df0a876b3d948bb1e14443c00c180bc8cccaa (patch)
tree9619fa49b3f1b66302cbae973603f1c3f41ba3b0 /drawinglayer
parentbc28d51cb88c796da241d1ab914bbe6bb174cc49 (diff)
tdf#105998: Enhanced fix for MetafileToBitmap at better place
Change-Id: I220bdbe196a68ef2df25885dceee70e15b760410 Reviewed-on: https://gerrit.libreoffice.org/59220 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx42
1 files changed, 3 insertions, 39 deletions
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index b1c974de028c..0845c3316643 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -41,7 +41,6 @@
#include "helperwrongspellrenderer.hxx"
#include <drawinglayer/primitive2d/fillhatchprimitive2d.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <vcl/hatch.hxx>
#include <tools/diagnose_ex.h>
#include <sal/log.hxx>
@@ -136,27 +135,6 @@ namespace drawinglayer
return true;
}
- //Resolves: tdf#105998 if we are a hairline along the very right/bottom edge
- //of the canvas then distort the polygon inwards one pixel right/bottom so that
- //the hairline falls inside the paintable area and becomes visible
- Size aSize = mpOutputDevice->GetOutputSize();
- basegfx::B2DRange aRange = aLocalPolygon.getB2DRange();
- basegfx::B2DRange aOutputRange = aRange;
- aOutputRange.transform(maCurrentTransformation);
- if (std::round(aOutputRange.getMaxX()) == aSize.Width() || std::round(aOutputRange.getMaxY()) == aSize.Height())
- {
- basegfx::B2DRange aOnePixel(0, 0, 1, 1);
- aOnePixel.transform(maCurrentTransformation);
- double fXOnePixel = 1.0 / aOnePixel.getMaxX();
- double fYOnePixel = 1.0 / aOnePixel.getMaxY();
-
- basegfx::B2DPoint aTopLeft(aRange.getMinX(), aRange.getMinY());
- basegfx::B2DPoint aTopRight(aRange.getMaxX() - fXOnePixel, aRange.getMinY());
- basegfx::B2DPoint aBottomLeft(aRange.getMinX(), aRange.getMaxY() - fYOnePixel);
- basegfx::B2DPoint aBottomRight(aRange.getMaxX() - fXOnePixel, aRange.getMaxY() - fYOnePixel);
- aLocalPolygon = basegfx::utils::distort(aLocalPolygon, aRange, aTopLeft, aTopRight, aBottomLeft, aBottomRight);
- }
-
const basegfx::BColor aLineColor(maBColorModifierStack.getModifiedColor(rSource.getBColor()));
mpOutputDevice->SetFillColor();
@@ -204,10 +182,6 @@ namespace drawinglayer
return true;
}
- const basegfx::BColor aLineColor(
- maBColorModifierStack.getModifiedColor(
- rSource.getLineAttribute().getColor()));
-
double fLineWidth(rSource.getLineAttribute().getWidth());
if(basegfx::fTools::more(fLineWidth, 0.0))
@@ -228,19 +202,9 @@ namespace drawinglayer
fLineWidth = 0.0;
}
- //Related: tdf#105998 cut and paste as bitmap of shape from draw to
- //writer. If we are a hairline along the very right/bottom edge of
- //the canvas then fallback to defaults which can distort the
- //hairline inside the paintable area
- if (fLineWidth == 0.0)
- {
- Size aSize = mpOutputDevice->GetOutputSize();
- basegfx::B2DRange aRange = aHairLinePolyPolygon.getB2DRange();
- basegfx::B2DRange aOutputRange = aRange;
- aOutputRange.transform(maCurrentTransformation);
- if (std::round(aOutputRange.getMaxX()) == aSize.Width() || std::round(aOutputRange.getMaxY()) == aSize.Height())
- return false;
- }
+ const basegfx::BColor aLineColor(
+ maBColorModifierStack.getModifiedColor(
+ rSource.getLineAttribute().getColor()));
mpOutputDevice->SetFillColor();
mpOutputDevice->SetLineColor(Color(aLineColor));