vcl/source/outdev/rect.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit fb974bc968b3a1a95f8e621776076522ec719dc6 Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Thu Nov 7 14:11:35 2019 +0000 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu Nov 7 15:54:22 2019 +0100 Drawing calc grid misses pixels on bottom and right; fix. Don't attempt to offset empty rectangles causing serious problems. Change-Id: I6fcac11f5f5e03f7edc0662cf4e06e7f8a109f00 Reviewed-on: https://gerrit.libreoffice.org/82220 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx index 63a876eb2bdb..45c38c5d23d3 100644 --- a/vcl/source/outdev/rect.cxx +++ b/vcl/source/outdev/rect.cxx @@ -224,10 +224,6 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D tools::Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() ); aDstRect.Intersection( rRect ); - // FIXME: seems we have an off-by-one around the border - // here with the cairo / svp backend at least. - aDstRect.AdjustRight(1); - aDstRect.AdjustBottom(1); if( aDstRect.IsEmpty() || ImplIsRecordLayout() ) return; @@ -241,6 +237,11 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D if( mbOutputClipped ) return; + // FIXME: seems we have an off-by-one around the border + // here with the cairo / svp backend at least. + aDstRect.AdjustRight(1); + aDstRect.AdjustBottom(1); + const long nDistX = std::max( rDist.Width(), 1L ); const long nDistY = std::max( rDist.Height(), 1L ); long nX = ( rRect.Left() >= aDstRect.Left() ) ? rRect.Left() : ( rRect.Left() + ( ( aDstRect.Left() - rRect.Left() ) / nDistX ) * nDistX ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits