diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-10 14:06:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-10 15:54:11 +0200 |
commit | 04f02cfecfae481f256b6c98a1940fc5235a921a (patch) | |
tree | f2531f6d05e74109ab3a52c821281922db4b806f /vcl/source | |
parent | 6ec2d6461fe9c41025ce2bde13ddeb02acb01cb3 (diff) |
AlphaMask::BlendWith wants an AlphaMask parameter
so make it so
Change-Id: Ia5a91c78d2fd10f22eb19e4ebbd753151149190f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151630
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/bitmap/alpha.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/source/bitmap/alpha.cxx b/vcl/source/bitmap/alpha.cxx index 8618c052ab03..ab23c3e93427 100644 --- a/vcl/source/bitmap/alpha.cxx +++ b/vcl/source/bitmap/alpha.cxx @@ -80,7 +80,7 @@ void AlphaMask::Erase( sal_uInt8 cTransparency ) Bitmap::Erase( Color( cTransparency, cTransparency, cTransparency ) ); } -void AlphaMask::BlendWith(const Bitmap& rOther) +void AlphaMask::BlendWith(const AlphaMask& rOther) { std::shared_ptr<SalBitmap> xImpBmp(ImplGetSVData()->mpDefInst->CreateSalBitmap()); if (xImpBmp->Create(*ImplGetSalBitmap()) && xImpBmp->AlphaBlendWith(*rOther.ImplGetSalBitmap())) @@ -88,8 +88,7 @@ void AlphaMask::BlendWith(const Bitmap& rOther) ImplSetSalBitmap(xImpBmp); return; } - AlphaMask aOther(rOther); // to 8 bits - Bitmap::ScopedReadAccess pOtherAcc(aOther); + Bitmap::ScopedReadAccess pOtherAcc(const_cast<AlphaMask&>(rOther)); AlphaScopedWriteAccess pAcc(*this); assert (pOtherAcc && pAcc && pOtherAcc->GetBitCount() == 8 && pAcc->GetBitCount() == 8 && "cannot BlendWith this combination"); if (!(pOtherAcc && pAcc && pOtherAcc->GetBitCount() == 8 && pAcc->GetBitCount() == 8)) |