diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-18 09:53:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-18 13:38:36 +0200 |
commit | 25f4ef5aa5488869b3bad045ba203c6b22b2e2f0 (patch) | |
tree | 78a15cc5a92192c10392039f10734a0b189d13d2 /svx/source | |
parent | ec2e02cfa41510c3d30b118cbf7595c84a046d03 (diff) |
tdf#157792 followup
avoid doing some extra Invert() operations by creating an AlphaMask
instead of a Bitmap to pass to the BitmapEx constructor.
Change-Id: I1af3a5e65010b346fa0d0c56836d567e51c9b58b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158106
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/_bmpmask.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/_contdlg.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index ba11eeacd1da..1db7e661cdd7 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -612,10 +612,10 @@ BitmapEx SvxBmpMask::ImpMaskTransparent( const BitmapEx& rBitmapEx, const Color& EnterWait(); BitmapEx aBmpEx; - Bitmap aMask( rBitmapEx.GetBitmap().CreateMask( rColor, nTol ) ); + AlphaMask aMask( rBitmapEx.GetBitmap().CreateAlphaMask( rColor, nTol ) ); if( rBitmapEx.IsAlpha() ) - aMask.CombineOr( rBitmapEx.GetAlphaMask() ); + aMask.AlphaCombineOr( rBitmapEx.GetAlphaMask() ); aBmpEx = BitmapEx( rBitmapEx.GetBitmap(), aMask ); LeaveWait(); diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index ec122e3b1373..725ce095c9ed 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -631,10 +631,10 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void ) { const tools::Long nTol = static_cast<tools::Long>(m_xMtfTolerance->get_value(FieldUnit::PERCENT) * 255 / 100); - Bitmap aMask = aGraphic.GetBitmapEx().GetBitmap().CreateMask( rColor, nTol ); + AlphaMask aMask = aGraphic.GetBitmapEx().GetBitmap().CreateAlphaMask( rColor, nTol ); if( aGraphic.IsTransparent() ) - aMask.CombineOr( aGraphic.GetBitmapEx().GetAlphaMask() ); + aMask.AlphaCombineOr( aGraphic.GetBitmapEx().GetAlphaMask() ); if( !aMask.IsEmpty() ) { |