29 , mFncGetPixel(nullptr)
30 , mFncSetPixel(nullptr)
140 if (
mpBuffer && fX >= 0.0 && fY >= 0.0)
142 const sal_Int64 nX(
static_cast<sal_Int64
>(fX));
143 const sal_Int64 nY(
static_cast<sal_Int64
>(fY));
151 sal_Int16 nDeltaX((fX - (nX + 0.5)) * 255.0);
152 sal_Int16 nDeltaY((fY - (nY + 0.5)) * 255.0);
179 if (nDeltaX && nIndX >= 0 && nIndX < mpBuffer->
mnWidth)
187 if (nDeltaY && nIndY >= 0 && nIndY < mpBuffer->
mnHeight)
195 if (nDeltaX && nDeltaY && nIndX >= 0 && nIndY >= 0 && nIndX < mpBuffer->
mnWidth
202 if (aXCol != aRetval)
204 aRetval.
Merge(aXCol, 255 - nDeltaX);
210 aYCol.
Merge(aXYCol, 255 - nDeltaX);
214 if (aRetval != aYCol)
216 aRetval.
Merge(aYCol, 255 - nDeltaY);
231 if (
mpBuffer && fX >= 0.0 && fY >= 0.0)
233 const sal_Int32 nX(
static_cast<sal_Int32
>(fX));
234 const sal_Int32 nY(
static_cast<sal_Int32
>(fY));
248 return BitmapColor(pScanline[nX >> 3] & (1 << (7 - (nX & 7))) ? 1 : 0);
257 rByte |= 1 << (7 - (nX & 7));
259 rByte &= ~(1 << (7 - (nX & 7)));
271 pScanline[nX] = rBitmapColor.
GetIndex();
279 pScanline = pScanline + nX * 3;
280 aBitmapColor.
SetBlue(*pScanline++);
281 aBitmapColor.
SetGreen(*pScanline++);
282 aBitmapColor.
SetRed(*pScanline);
290 pScanline = pScanline + nX * 3;
291 *pScanline++ = rBitmapColor.
GetBlue();
292 *pScanline++ = rBitmapColor.
GetGreen();
293 *pScanline = rBitmapColor.
GetRed();
301 pScanline = pScanline + nX * 3;
302 aBitmapColor.
SetRed(*pScanline++);
303 aBitmapColor.
SetGreen(*pScanline++);
304 aBitmapColor.
SetBlue(*pScanline);
312 pScanline = pScanline + nX * 3;
313 *pScanline++ = rBitmapColor.
GetRed();
314 *pScanline++ = rBitmapColor.
GetGreen();
315 *pScanline = rBitmapColor.
GetBlue();
321 pScanline = pScanline + nX * 4;
337 pScanline = pScanline + (nX << 2) + 1;
338 aBitmapColor.
SetBlue(*pScanline++);
339 aBitmapColor.
SetGreen(*pScanline++);
340 aBitmapColor.
SetRed(*pScanline);
348 pScanline = pScanline + nX * 4;
351 *pScanline++ =
alpha;
360 pScanline = pScanline + (nX << 2);
362 *pScanline++ = rBitmapColor.
GetBlue();
363 *pScanline++ = rBitmapColor.
GetGreen();
364 *pScanline = rBitmapColor.
GetRed();
370 pScanline = pScanline + nX * 4;
386 pScanline = pScanline + (nX << 2) + 1;
387 aBitmapColor.
SetRed(*pScanline++);
388 aBitmapColor.
SetGreen(*pScanline++);
389 aBitmapColor.
SetBlue(*pScanline);
397 pScanline = pScanline + nX * 4;
400 *pScanline++ =
alpha;
409 pScanline = pScanline + (nX << 2);
411 *pScanline++ = rBitmapColor.
GetRed();
412 *pScanline++ = rBitmapColor.
GetGreen();
413 *pScanline = rBitmapColor.
GetBlue();
419 pScanline = pScanline + nX * 4;
435 pScanline = pScanline + (nX << 2);
436 aBitmapColor.
SetBlue(*pScanline++);
437 aBitmapColor.
SetGreen(*pScanline++);
438 aBitmapColor.
SetRed(*pScanline);
446 pScanline = pScanline + nX * 4;
458 pScanline = pScanline + (nX << 2);
459 *pScanline++ = rBitmapColor.
GetBlue();
460 *pScanline++ = rBitmapColor.
GetGreen();
461 *pScanline++ = rBitmapColor.
GetRed();
468 pScanline = pScanline + nX * 4;
484 pScanline = pScanline + (nX << 2);
485 aBitmapColor.
SetRed(*pScanline++);
486 aBitmapColor.
SetGreen(*pScanline++);
487 aBitmapColor.
SetBlue(*pScanline);
495 pScanline = pScanline + nX * 4;
507 pScanline = pScanline + (nX << 2);
508 *pScanline++ = rBitmapColor.
GetRed();
509 *pScanline++ = rBitmapColor.
GetGreen();
510 *pScanline++ = rBitmapColor.
GetBlue();
void(* FncSetPixel)(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
BitmapColor(* FncGetPixel)(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
bool Bitmap32IsPreMultipled()
const sal_uInt8 * ConstScanline
ScanlineFormat RemoveScanline(ScanlineFormat nFormat)
sal_uInt8 GetIndex() const
BitmapAccessMode mnAccessMode
friend class BitmapReadAccess
static void SetPixelForN32BitTcRgbx(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
BitmapColor GetColorWithFallback(double fY, double fX, const BitmapColor &rFallback) const
Get the color at coordinates fY, fX; if outside, return rFallback.
static void SetPixelForN32BitTcAbgr(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
static BitmapColor GetPixelForN8BitPal(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
static BitmapColor GetPixelForN32BitTcRgbx(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
static FncGetPixel GetPixelFunction(ScanlineFormat nFormat)
static BitmapColor GetPixelForN24BitTcRgb(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
virtual VCL_DLLPUBLIC ~BitmapReadAccess() override
static BitmapColor GetPixelForN32BitTcXbgr(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
static FncSetPixel SetPixelFunction(ScanlineFormat nFormat)
static BitmapColor GetPixelForN32BitTcBgra(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
static void SetPixelForN1BitMsbPal(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
static BitmapColor GetPixelForN1BitMsbPal(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
static void SetPixelForN24BitTcBgr(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
static void SetPixelForN24BitTcRgb(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
static BitmapColor GetPixelForN24BitTcBgr(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
BitmapColor GetColor(tools::Long nY, tools::Long nX) const
static void SetPixelForN32BitTcXrgb(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
static BitmapColor GetPixelForN32BitTcAbgr(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
static void SetPixelForN32BitTcRgba(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
static void SetPixelForN32BitTcBgrx(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
static BitmapColor GetPixelForN32BitTcBgrx(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
static BitmapColor GetPixelForN32BitTcArgb(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
BitmapColor GetInterpolatedColorWithFallback(double fY, double fX, const BitmapColor &rFallback) const
Get the interpolated color at coordinates fY, fX; if outside, return rFallback.
static void SetPixelForN8BitPal(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
static void SetPixelForN32BitTcBgra(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
static void SetPixelForN32BitTcArgb(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
static void SetPixelForN32BitTcMask(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
static BitmapColor GetPixelForN32BitTcXrgb(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
static void SetPixelForN32BitTcXbgr(Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
static BitmapColor GetPixelForN32BitTcRgba(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
static BitmapColor GetPixelForN32BitTcMask(ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
const std::shared_ptr< SalBitmap > & ImplGetSalBitmap() const
void SetColorFor32Bit(const BitmapColor &rColor, sal_uInt8 *pPixel) const
void GetColorFor32Bit(BitmapColor &rColor, const sal_uInt8 *pPixel) const
sal_uInt8 GetBlue() const
void SetGreen(sal_uInt8 nGreen)
void SetRed(sal_uInt8 nRed)
void Merge(const Color &rMergeColor, sal_uInt8 cTransparency)
sal_uInt8 GetAlpha() const
sal_uInt8 GetGreen() const
void SetBlue(sal_uInt8 nBlue)
bool supportsBitmap32() const
constexpr double alpha[nDetails]
sal_uInt8 unpremultiply(sal_uInt8 c, sal_uInt8 a)
sal_uInt8 premultiply(sal_uInt8 c, sal_uInt8 a)
ImplSVData * ImplGetSVData()