summaryrefslogtreecommitdiff
path: root/svx/source/dialog
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-02-27 15:50:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-26 12:51:58 +0200
commitddd2639a482befb4a3bf1f75a88e66c21a691b67 (patch)
tree2d2a2a0695dce2b8b065f107368ef0412807fa73 /svx/source/dialog
parent9c4e0c35d70659097b235028047efcb80dcfb10d (diff)
drop mask from BitmapEx
So that we have fewer cases to deal with when we transition to 32-bit bitmaps. (*) rename maMask to maAlphaMask, since now it is only being used for alpha duties. (*) drop mbAlpha and mbTransparent to simplify state management, the only thing we need to check for alpha is if maAlphaMask is non-empty. Change-Id: I06252e38e950e846a94b4c2ba8ea763be17801fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111679 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/dialog')
-rw-r--r--svx/source/dialog/_bmpmask.cxx6
-rw-r--r--svx/source/dialog/_contdlg.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 2515a8850408..a74e6273d4e2 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -614,8 +614,8 @@ BitmapEx SvxBmpMask::ImpMaskTransparent( const BitmapEx& rBitmapEx, const Color&
BitmapEx aBmpEx;
Bitmap aMask( rBitmapEx.GetBitmap().CreateMask( rColor, nTol ) );
- if( rBitmapEx.IsTransparent() )
- aMask.CombineSimple( rBitmapEx.GetMask(), BmpCombine::Or );
+ if( rBitmapEx.IsAlpha() )
+ aMask.CombineSimple( rBitmapEx.GetAlpha(), BmpCombine::Or );
aBmpEx = BitmapEx( rBitmapEx.GetBitmap(), aMask );
LeaveWait();
@@ -995,7 +995,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
{
ImpMask( aBitmapEx );
if ( aGraphic.IsTransparent() )
- aGraphic = Graphic( BitmapEx( aBitmapEx.GetBitmap(), aBitmapEx.GetMask() ) );
+ aGraphic = Graphic( BitmapEx( aBitmapEx.GetBitmap(), aBitmapEx.GetAlpha() ) );
else
aGraphic = aBitmapEx;
}
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index bba90c16a1a0..616f8774050d 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -115,7 +115,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
}
}
else if( rGraphic.IsTransparent() )
- aBmp = rGraphic.GetBitmapEx().GetMask();
+ aBmp = rGraphic.GetBitmapEx().GetAlpha();
else
{
aBmp = rGraphic.GetBitmapEx().GetBitmap();
@@ -634,7 +634,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void )
Bitmap aMask = aGraphic.GetBitmapEx().GetBitmap().CreateMask( rColor, nTol );
if( aGraphic.IsTransparent() )
- aMask.CombineSimple( aGraphic.GetBitmapEx().GetMask(), BmpCombine::Or );
+ aMask.CombineSimple( aGraphic.GetBitmapEx().GetAlpha(), BmpCombine::Or );
if( !aMask.IsEmpty() )
{