summaryrefslogtreecommitdiff
path: root/vcl/source/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-05-07 16:56:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-05-07 20:17:16 +0200
commit1c7cbd685633d44eac554629572f3401c450f855 (patch)
treeb7265034a37bbcf76ea5e91340eb90c84a5dda93 /vcl/source/filter
parent918012d94cf9419318e66aaa489a75e56f81074f (diff)
use AlphaMask for variables when calling GetAlphaMask
Right now this doesn't make any difference, since Bitmap is the superclass of AlphaMask. But when I switch to using alpha instead of transparency, passing AlphaMask around is going to mean something different to passing plain Bitmap around. Change-Id: Ic1541e5f0a3b97331793cd23e23115faa7f382b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151463 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/filter')
-rw-r--r--vcl/source/filter/egif/egif.cxx2
-rw-r--r--vcl/source/filter/eps/eps.cxx8
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx6
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx6
4 files changed, 11 insertions, 11 deletions
diff --git a/vcl/source/filter/egif/egif.cxx b/vcl/source/filter/egif/egif.cxx
index f908b6235133..8da427a86c19 100644
--- a/vcl/source/filter/egif/egif.cxx
+++ b/vcl/source/filter/egif/egif.cxx
@@ -242,7 +242,7 @@ bool GIFWriter::CreateAccess( const BitmapEx& rBmpEx )
{
if( bStatus )
{
- Bitmap aMask( rBmpEx.GetAlphaMask() );
+ AlphaMask aMask( rBmpEx.GetAlphaMask() );
aAccBmp = rBmpEx.GetBitmap();
bTransparent = false;
diff --git a/vcl/source/filter/eps/eps.cxx b/vcl/source/filter/eps/eps.cxx
index 8a4c140ee82d..455e89cc543a 100644
--- a/vcl/source/filter/eps/eps.cxx
+++ b/vcl/source/filter/eps/eps.cxx
@@ -819,7 +819,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
Bitmap aBitmap( aBitmapEx.GetBitmap() );
if ( mbGrayScale )
aBitmap.Convert( BmpConversion::N8BitGreys );
- Bitmap aMask( aBitmapEx.GetAlphaMask() );
+ AlphaMask aMask( aBitmapEx.GetAlphaMask() );
Point aPoint( static_cast<const MetaBmpExAction*>(pMA)->GetPoint() );
Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) );
ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() );
@@ -832,7 +832,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
Bitmap aBitmap( aBitmapEx.GetBitmap() );
if ( mbGrayScale )
aBitmap.Convert( BmpConversion::N8BitGreys );
- Bitmap aMask( aBitmapEx.GetAlphaMask() );
+ AlphaMask aMask( aBitmapEx.GetAlphaMask() );
Point aPoint = static_cast<const MetaBmpExScaleAction*>(pMA)->GetPoint();
Size aSize( static_cast<const MetaBmpExScaleAction*>(pMA)->GetSize() );
ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() );
@@ -847,7 +847,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
Bitmap aBitmap( aBitmapEx.GetBitmap() );
if ( mbGrayScale )
aBitmap.Convert( BmpConversion::N8BitGreys );
- Bitmap aMask( aBitmapEx.GetAlphaMask() );
+ AlphaMask aMask( aBitmapEx.GetAlphaMask() );
Point aPoint = static_cast<const MetaBmpExScalePartAction*>(pMA)->GetDestPoint();
Size aSize = static_cast<const MetaBmpExScalePartAction*>(pMA)->GetDestSize();
ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() );
@@ -907,7 +907,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
// gradient action
}
- Bitmap aMask( aBitmapEx.GetAlphaMask() );
+ AlphaMask aMask( aBitmapEx.GetAlphaMask() );
ImplBmp( &aBitmap, &aMask, Point( aRect.Left(), aRect.Top() ), aRect.GetWidth(), aRect.GetHeight() );
}
else
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index cb717559fe84..74ee7462bb6a 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -1294,7 +1294,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
const MetaBmpExAction* pA = static_cast<const MetaBmpExAction *>(pAction);
Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
- Bitmap aMsk( pA->GetBitmapEx().GetAlphaMask() );
+ AlphaMask aMsk( pA->GetBitmapEx().GetAlphaMask() );
if( !aMsk.IsEmpty() )
{
@@ -1312,7 +1312,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
- Bitmap aMsk( pA->GetBitmapEx().GetAlphaMask() );
+ AlphaMask aMsk( pA->GetBitmapEx().GetAlphaMask() );
if( !aMsk.IsEmpty() )
{
@@ -1332,7 +1332,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
BitmapEx aBmpEx( pA->GetBitmapEx() );
aBmpEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
Bitmap aBmp( aBmpEx.GetBitmap() );
- Bitmap aMsk( aBmpEx.GetAlphaMask() );
+ AlphaMask aMsk( aBmpEx.GetAlphaMask() );
if( !aMsk.IsEmpty() )
{
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 124ea571dc3d..7afc3a62fa73 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -1245,7 +1245,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
{
const MetaBmpExAction* pA = static_cast<const MetaBmpExAction *>(pMA);
Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
- Bitmap aMsk( pA->GetBitmapEx().GetAlphaMask() );
+ AlphaMask aMsk( pA->GetBitmapEx().GetAlphaMask() );
if( !aMsk.IsEmpty() )
{
@@ -1263,7 +1263,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
{
const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pMA);
Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
- Bitmap aMsk( pA->GetBitmapEx().GetAlphaMask() );
+ AlphaMask aMsk( pA->GetBitmapEx().GetAlphaMask() );
if( !aMsk.IsEmpty() )
{
@@ -1283,7 +1283,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
BitmapEx aBmpEx( pA->GetBitmapEx() );
aBmpEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
Bitmap aBmp( aBmpEx.GetBitmap() );
- Bitmap aMsk( aBmpEx.GetAlphaMask() );
+ AlphaMask aMsk( aBmpEx.GetAlphaMask() );
if( !aMsk.IsEmpty() )
{