summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-05-14 16:44:17 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-05-14 19:47:32 +0200
commit35ab83872f184c22c5f52f43ee38d3669340b192 (patch)
treebd9c502a69b07409f130837ad06d74377afe15df /drawinglayer
parent4cac171dd6c82f55624ba6e7185d69bcb5507cb1 (diff)
Revert "drawinglayer: avoid AA for hairline polygons built from ...
.. hori/vert lines only" This reverts commit f8b4d371eddd27594d549fb00294c01229a9bd24. Tomaz considers this ugly and it's no longer needed since commit 93abdf39b01bb7b404dc09ef37369a4350fb0d10 (sw lok: assume no windows in SwLayoutFrame::PaintSwFrame(), 2019-05-14). Conflicts: basegfx/test/B2DPolygonTest.cxx Change-Id: Ia9b29921ff3e5d82085e1abf9f39c172357a5e13 Reviewed-on: https://gerrit.libreoffice.org/72297 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx10
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx10
2 files changed, 0 insertions, 20 deletions
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index db65dc3de4bb..03012fb5d35a 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -140,16 +140,6 @@ namespace drawinglayer
mpOutputDevice->SetLineColor(Color(aLineColor));
//aLocalPolygon.transform(maCurrentTransformation);
- if (getOptionsDrawinglayer().IsAntiAliasing() && getOptionsDrawinglayer().IsSnapHorVerLinesToDiscrete())
- {
- if (basegfx::utils::containsOnlyHorizontalOrVerticalLines(rLocalPolygon))
- {
- // DrawPolyLineDirect() only works in AA mode, but pure horizontal or vertical
- // lines are better with AA off.
- return false;
- }
- }
-
// try drawing; if it did not work, use standard fallback
return mpOutputDevice->DrawPolyLineDirect(
maCurrentTransformation,
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 335e30a56ce9..361f7a5bd5a3 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -331,7 +331,6 @@ namespace drawinglayer
basegfx::B2DPolygon aLocalPolygon(rPolygonCandidate.getB2DPolygon());
aLocalPolygon.transform(maCurrentTransformation);
- bool bDisableAA = false;
if(bPixelBased && getOptionsDrawinglayer().IsAntiAliasing() && getOptionsDrawinglayer().IsSnapHorVerLinesToDiscrete())
{
// #i98289#
@@ -340,18 +339,9 @@ namespace drawinglayer
// not-AntiAliased such lines look more pleasing to the eye (e.g. 2D chart content). This
// NEEDS to be done in discrete coordinates, so only useful for pixel based rendering.
aLocalPolygon = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges(aLocalPolygon);
-
- // Also disable AA, snap would leave the start/end of lines still anti-aliased when
- // their coordinates are provided in logic units.
- bDisableAA = basegfx::utils::containsOnlyHorizontalOrVerticalLines(aLocalPolygon);
}
- const AntialiasingFlags nOriginalAA(mpOutputDevice->GetAntialiasing());
- if (bDisableAA && (nOriginalAA & AntialiasingFlags::EnableB2dDraw))
- mpOutputDevice->SetAntialiasing(nOriginalAA & ~AntialiasingFlags::EnableB2dDraw);
mpOutputDevice->DrawPolyLine(aLocalPolygon, 0.0);
- if (bDisableAA && (nOriginalAA & AntialiasingFlags::EnableB2dDraw))
- mpOutputDevice->SetAntialiasing(mpOutputDevice->GetAntialiasing() | AntialiasingFlags::EnableB2dDraw);
}
// direct draw of transformed BitmapEx primitive