diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-05-09 09:18:00 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-05-09 10:46:55 +0200 |
commit | f8b4d371eddd27594d549fb00294c01229a9bd24 (patch) | |
tree | 424a678ec749aca0431ef09d3eafff54d8c3eb13 /include/basegfx | |
parent | c1bcdf9aa5d8ea99435906ffa9787232a909ff0f (diff) |
drawinglayer: avoid AA for hairline polygons built from hori/vert lines only
For one, it seems this was the intention already since commit
85c70f37b56299f6fa02312c0fb73cc55af084ef (CWS-TOOLING: integrate CWS
aw063, 2009-03-04): "suppress AntiAliasing for pure horizontal or
vertical lines".
For another, this fixes the TileCacheTests::testTileWireIDHandling()
testcase in online.git, which assumes that the indicators at the corners
of the Writer body frame (paragraph marks hidden / default case) can be
painted multiple times, producing pixel-by-pixel matching results. But
in reality AA breaks that assumption, and we know these indicators are
never diagonal lines.
Change-Id: Ib74f823165799991296b64cee58ec106dbdcedcf
Reviewed-on: https://gerrit.libreoffice.org/72000
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'include/basegfx')
-rw-r--r-- | include/basegfx/polygon/b2dpolygontools.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/basegfx/polygon/b2dpolygontools.hxx b/include/basegfx/polygon/b2dpolygontools.hxx index 57b9130b4399..fbd73220ec29 100644 --- a/include/basegfx/polygon/b2dpolygontools.hxx +++ b/include/basegfx/polygon/b2dpolygontools.hxx @@ -445,6 +445,9 @@ namespace basegfx */ BASEGFX_DLLPUBLIC B2DPolygon snapPointsOfHorizontalOrVerticalEdges(const B2DPolygon& rCandidate); + /// Determines if rPolygon lacks diagonal lines or not. + BASEGFX_DLLPUBLIC bool containsOnlyHorizontalOrVerticalLines(const basegfx::B2DPolygon& rPolygon); + /// get the tangent with which the given point is entered seen from the previous /// polygon path data. Take into account all stuff like closed state, zero-length edges and others. BASEGFX_DLLPUBLIC B2DVector getTangentEnteringPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndex); |