48 if( pEraseTransparency )
50 sal_uInt8 nAlpha = 255 - *pEraseTransparency;
61 *
static_cast<Bitmap*
>(
this) = rBitmap;
90 std::shared_ptr<SalBitmap> xImpBmp(
ImplGetSVData()->mpDefInst->CreateSalBitmap());
100 assert (pOtherAcc && pAcc && pOtherAcc->
GetBitCount() == 8 && pAcc->GetBitCount() == 8 &&
"cannot BlendWith this combination");
101 if (!(pOtherAcc && pAcc && pOtherAcc->
GetBitCount() == 8 && pAcc->GetBitCount() == 8))
103 SAL_WARN(
"vcl",
"cannot BlendWith this combination");
111 Scanline scanline = pAcc->GetScanline(
y );
116 const sal_uInt16 nGrey1 = *scanline;
117 const sal_uInt16 nGrey2 = *otherScanline;
121 auto tmp = 255 - ((255 - nGrey1) + (255 - nGrey2) - (255 - nGrey1) * (255 - nGrey2));
122 *scanline =
static_cast<sal_uInt8>(tmp / 255);
143 if(0 == nHeight || 0 == nWidth)
150 if (255 != pAcc->GetColor(
y,
x).GetRed())
const sal_uInt8 * ConstScanline
AlphaMask & operator=(const Bitmap &rBitmap)
Bitmap const & GetBitmap() const
void ReleaseAccess(BitmapReadAccess *pAccess)
virtual ~AlphaMask() override
SAL_DLLPRIVATE const Bitmap & ImplGetBitmap() const
void Erase(sal_uInt8 cTransparency)
void BlendWith(const AlphaMask &rOther)
tools::Long Height() const
tools::Long Width() const
sal_uInt16 GetBitCount() const
Scanline GetScanline(tools::Long nY) const
const std::shared_ptr< SalBitmap > & ImplGetSalBitmap() const
bool HasGreyPalette8Bit() const
SAL_DLLPRIVATE void ImplSetSalBitmap(const std::shared_ptr< SalBitmap > &xImpBmp)
bool Convert(BmpConversion eConversion)
Convert bitmap format.
static void ReleaseAccess(BitmapInfoAccess *pAccess)
bool Erase(const Color &rFillColor)
Fill the entire bitmap with the given color.
vcl::PixelFormat getPixelFormat() const
constexpr ::Color COL_ALPHA_OPAQUE(0xff, 0xff, 0xff)
#define SAL_WARN(area, stream)
PixelFormat
Pixel format of the bitmap in bits per pixel.
ImplSVData * ImplGetSVData()