summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-11-14 16:01:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-11-15 06:56:06 +0100
commit48e4a871d926b534eb6131d16d04d68b151b2847 (patch)
treeacff758f6a02a4f806b8bbd6b6f2a094d68006a6 /vcl
parent92e5898fa9ffa4dd8742f5f26e790563feef286e (diff)
loplugin:unusedmethods
Change-Id: I1e125bbd388953491b3f869641484fea737d39ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159423 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/bitmap/bitmappaint.cxx39
1 files changed, 0 insertions, 39 deletions
diff --git a/vcl/source/bitmap/bitmappaint.cxx b/vcl/source/bitmap/bitmappaint.cxx
index f3e51dd2af64..5d405322e6ed 100644
--- a/vcl/source/bitmap/bitmappaint.cxx
+++ b/vcl/source/bitmap/bitmappaint.cxx
@@ -1162,45 +1162,6 @@ bool Bitmap::Replace(const Color* pSearchColors, const Color* pReplaceColors, si
return true;
}
-bool Bitmap::CombineOr(const Bitmap& rMask)
-{
- assert(!dynamic_cast<AlphaMask*>(this) && "should rather be calling AlphaMask::AlphaCombineOr");
- assert(!dynamic_cast<const AlphaMask*>(&rMask)
- && "should rather be calling AlphaMask::AlphaCombineOr");
- ScopedReadAccess pMaskAcc(const_cast<Bitmap&>(rMask));
- BitmapScopedWriteAccess pAcc(*this);
-
- if (!pMaskAcc || !pAcc)
- return false;
-
- const tools::Long nWidth = std::min(pMaskAcc->Width(), pAcc->Width());
- const tools::Long nHeight = std::min(pMaskAcc->Height(), pAcc->Height());
- const Color aColBlack(COL_BLACK);
- const BitmapColor aWhite(pAcc->GetBestMatchingColor(COL_WHITE));
- const BitmapColor aBlack(pAcc->GetBestMatchingColor(aColBlack));
- const BitmapColor aMaskBlack(pMaskAcc->GetBestMatchingColor(aColBlack));
-
- for (tools::Long nY = 0; nY < nHeight; nY++)
- {
- Scanline pScanline = pAcc->GetScanline(nY);
- Scanline pScanlineMask = pMaskAcc->GetScanline(nY);
- for (tools::Long nX = 0; nX < nWidth; nX++)
- {
- if (pMaskAcc->GetPixelFromData(pScanlineMask, nX) != aMaskBlack
- || pAcc->GetPixelFromData(pScanline, nX) != aBlack)
- {
- pAcc->SetPixelOnData(pScanline, nX, aWhite);
- }
- else
- {
- pAcc->SetPixelOnData(pScanline, nX, aBlack);
- }
- }
- }
-
- return true;
-}
-
// TODO: Have a look at OutputDevice::ImplDrawAlpha() for some
// optimizations. Might even consolidate the code here and there.
bool Bitmap::Blend(const AlphaMask& rAlpha, const Color& rBackgroundColor)