sw/source/core/doc/notxtfrm.cxx | 52 ---------------------------------------- 1 file changed, 1 insertion(+), 51 deletions(-)
New commits: commit 11e93c63ac8a232ce0b5242dd1de532dc33daf8b Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Mar 11 12:42:47 2021 +0100 Commit: Gabor Kelemen <kelemen.gab...@nisz.hu> CommitDate: Thu Apr 29 11:35:32 2021 +0200 Revert "tdf#114076: Expand ClipRange to next PixelBound" ... and "tdf#124272 use ClipRegion's geometry if not a rectangle" This commit reverts c1230cede19ae3633e51c7ca780cb34d9dbaa20f and 362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c tdf#114076, or any of its duplicates, is not reproducible in master if c1230cede19ae3633e51c7ca780cb34d9dbaa20f ("tdf#114076: Expand ClipRange to next PixelBound") is reverted. (Tested on Linux and Windows) So, if we revert it, we no longer need 362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c ("tdf#124272 use ClipRegion's geometry if not a rectangle"), which was a follow-up fix for a regression introduced by the first commit. This also fixes tdf#129085 and all the duplicates, which were introduced by the follow-up commit. I plan to add the unittests in a different commit Change-Id: Ie4328c15b24b521127c1b653bd621bfc92ac39cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112340 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112398 Reviewed-by: Armin Le Grand <armin.le.gr...@me.com> (cherry picked from commit 8926d9282fe84793ce909471b5caec3583fd3ec9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112530 Reviewed-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit cf453e399c94f3af49a614c266f7c2e9a1ad45fa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114855 Tested-by: Gabor Kelemen <kelemen.gab...@nisz.hu> Reviewed-by: Gabor Kelemen <kelemen.gab...@nisz.hu> diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 550f0df508db..291608431bfa 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -982,59 +982,9 @@ void paintGraphicUsingPrimitivesHelper( if(0 != aClip.count()) { - // tdf#114076: Expand ClipRange to next PixelBound - // Do this by going to basegfx::B2DRange, adding a - // single pixel size and using floor/ceil to go to - // full integer (as needed for pixels). Also need - // to go back to basegfx::B2DPolyPolygon for the - // creation of the needed MaskPrimitive2D. - // The general problem is that Writer is scrolling - // using blitting the unchanged parts, this forces - // this part of the scroll to pixel coordinate steps, - // while the ViewTransformation for paint nowadays has - // a sub-pixel precision. This results in an offset - // up to one pixel in radius. To solve this for now, - // we need to expand to the next outer pixel bound. - // Hopefully in the future we will someday be able to - // stay on the full available precision, but this - // will need a change in the repaint/scroll paradigm. - const basegfx::B2DRange aClipRange(aClip.getB2DRange()); - const basegfx::B2DVector aSinglePixelXY(rOutputDevice.GetInverseViewTransformation() * basegfx::B2DVector(1.0, 1.0)); - const basegfx::B2DRange aExpandedClipRange( - floor(aClipRange.getMinX() - aSinglePixelXY.getX()), - floor(aClipRange.getMinY() - aSinglePixelXY.getY()), - ceil(aClipRange.getMaxX() + aSinglePixelXY.getX()), - ceil(aClipRange.getMaxY() + aSinglePixelXY.getY())); - - // create the enclosing rectangle as polygon - basegfx::B2DPolyPolygon aTarget(basegfx::utils::createPolygonFromRect(aExpandedClipRange)); - - // tdf#124272 the fix above (tdf#114076) was too rough - the - // clip region used may be a PolyPolygon. In that case that - // PolyPolygon would have to be scaled to mentioned PixelBounds. - // Since that is not really possible geometrically (would need - // more some 'grow in outside direction' but with unequal grow - // values in all directions - just maaany problems - // involved), use a graphical trick: The topology of the - // PolyPolygon uses the standard FillRule, so adding the now - // guaranteed to be bigger or equal bounding (enclosing) - // rectangle twice as polygon will expand the BoundRange, but - // not change the geometry visualization at all - if(!rOutputDevice.GetClipRegion().IsRectangle()) - { - // double the outer rectangle range polygon to have it - // included twice - aTarget.append(aTarget.getB2DPolygon(0)); - - // add the original clip 'inside' (due to being smaller - // or equal). That PolyPolygon may have an unknown number - // of polygons (>=1) - aTarget.append(aClip); - } - drawinglayer::primitive2d::MaskPrimitive2D* pNew( new drawinglayer::primitive2d::MaskPrimitive2D( - aTarget, + aClip, rContent)); rContent.resize(1); rContent[0] = pNew; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits