vcl/source/gdi/print2.cxx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
New commits: commit f8820fea3f0c3c50a9755351a33dde9b082e6456 Author: Chris Sherlock <[email protected]> AuthorDate: Tue May 12 06:31:39 2020 +1000 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Fri May 15 08:08:48 2020 +0200 vcl: refactor - move rect coverage check out of checkRect Change-Id: I68d24fd0b94286155750ccb5fa83bf7a897ada5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94021 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <[email protected]> diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index d60ba034742c..481cafcf814e 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -89,6 +89,17 @@ bool DoesActionHandleTransparency( const MetaAction& rAct ) } } +bool doesRectCoverWithUniformColor( + tools::Rectangle const & rPrevRect, + tools::Rectangle const & rCurrRect, + OutputDevice const & rMapModeVDev) +{ + // shape needs to fully cover previous content, and have uniform + // color + return (rMapModeVDev.LogicToPixel(rCurrRect).IsInside(rPrevRect) && + rMapModeVDev.IsFillColor()); +} + /** Check whether rCurrRect rectangle fully covers io_rPrevRect - if yes, return true and update o_rBgColor */ @@ -97,11 +108,7 @@ bool checkRect( tools::Rectangle& io_rPrevRect, const tools::Rectangle& rCurrRect, OutputDevice const & rMapModeVDev ) { - // shape needs to fully cover previous content, and have uniform - // color - const bool bRet( - rMapModeVDev.LogicToPixel(rCurrRect).IsInside(io_rPrevRect) && - rMapModeVDev.IsFillColor() ); + bool bRet = doesRectCoverWithUniformColor(io_rPrevRect, rCurrRect, rMapModeVDev); if( bRet ) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
