diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-08-21 12:53:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-21 13:05:26 +0100 |
commit | 43297fc501cd51982db1e7ed1fa1d4a1c18d0871 (patch) | |
tree | 93c27726cffed2c51e60f388017ea0c87853ff12 /canvas | |
parent | 454e1ebcfc589ce82c8c2d5585e22bea1ea5fc79 (diff) |
Related: tdf#86473 git rid of special pixel snapping for rectangles
Change-Id: Ia9ab5c58975df2de8c261d92a866cbe264d03205
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_canvashelper.cxx | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index 9b64c08a991f..4f28f5dc9010 100644 --- a/canvas/source/cairo/cairo_canvashelper.cxx +++ b/canvas/source/cairo/cairo_canvashelper.cxx @@ -973,27 +973,6 @@ namespace cairocanvas if( nPointCount > 1) { bool bIsBezier = aPolygon.areControlPointsUsed(); - bool bIsRectangle = ::basegfx::tools::isRectangle(aPolygon); - if (bIsRectangle) - { - //tdf#86473, if this rectangle will end up after rounding - //to have no area, then nothing will be drawn, so remove - //such rectangles from the rounding optimization(?) effort - basegfx::B2DRange aRange = ::basegfx::tools::getRange(aPolygon); - double x1 = aRange.getMinX(); - double x2 = aRange.getMaxX(); - double y1 = aRange.getMinY(); - double y2 = aRange.getMaxY(); - cairo_matrix_transform_point(&aOrigMatrix, &x1, &y1); - cairo_matrix_transform_point(&aOrigMatrix, &x2, &y2); - basegfx::B2DRange aRoundedRange(basegfx::fround(x1), - basegfx::fround(y1), - basegfx::fround(x2), - basegfx::fround(y2)); - bIsRectangle = aRoundedRange.getWidth() != 0.0 && - aRoundedRange.getHeight() != 0.0; - } - ::basegfx::B2DPoint aA, aB, aP; for( sal_uInt32 j=0; j < nExtendedPointCount; j++ ) @@ -1004,7 +983,7 @@ namespace cairocanvas nY = aP.getY(); cairo_matrix_transform_point( &aOrigMatrix, &nX, &nY ); - if( ! bIsBezier && (bIsRectangle || aOperation == Clip) ) + if (!bIsBezier && aOperation == Clip) { nX = basegfx::fround( nX ); nY = basegfx::fround( nY ); |