LibreOffice Module vcl (master) 1
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
BitmapReadAccess Class Reference

#include <BitmapReadAccess.hxx>

Inheritance diagram for BitmapReadAccess:
[legend]
Collaboration diagram for BitmapReadAccess:
[legend]

Public Member Functions

VCL_DLLPUBLIC BitmapReadAccess (Bitmap &rBitmap, BitmapAccessMode nMode=BitmapAccessMode::Read)
 
virtual VCL_DLLPUBLIC ~BitmapReadAccess () override
 
Scanline GetBuffer () const
 
Scanline GetScanline (tools::Long nY) const
 
BitmapColor GetPixelFromData (const sal_uInt8 *pData, tools::Long nX) const
 
sal_uInt8 GetIndexFromData (const sal_uInt8 *pData, tools::Long nX) const
 
void SetPixelOnData (sal_uInt8 *pData, tools::Long nX, const BitmapColor &rBitmapColor)
 
BitmapColor GetPixel (tools::Long nY, tools::Long nX) const
 
BitmapColor GetPixel (const Point &point) const
 
BitmapColor GetColor (tools::Long nY, tools::Long nX) const
 
BitmapColor GetColor (const Point &point) const
 
sal_uInt8 GetPixelIndex (tools::Long nY, tools::Long nX) const
 
sal_uInt8 GetPixelIndex (const Point &point) const
 
BitmapColor GetInterpolatedColorWithFallback (double fY, double fX, const BitmapColor &rFallback) const
 Get the interpolated color at coordinates fY, fX; if outside, return rFallback. More...
 
BitmapColor GetColorWithFallback (double fY, double fX, const BitmapColor &rFallback) const
 Get the color at coordinates fY, fX; if outside, return rFallback. More...
 
BitmapBufferImplGetBitmapBuffer () const
 
- Public Member Functions inherited from BitmapInfoAccess
 BitmapInfoAccess (Bitmap &rBitmap, BitmapAccessMode nMode=BitmapAccessMode::Info)
 
virtual ~BitmapInfoAccess ()
 
bool operator! () const
 
tools::Long Width () const
 
tools::Long Height () const
 
bool IsTopDown () const
 
bool IsBottomUp () const
 
ScanlineFormat GetScanlineFormat () const
 
sal_uInt32 GetScanlineSize () const
 
sal_uInt16 GetBitCount () const
 
BitmapColor GetBestMatchingColor (const BitmapColor &rBitmapColor) const
 
bool HasPalette () const
 
const BitmapPaletteGetPalette () const
 
sal_uInt16 GetPaletteEntryCount () const
 
const BitmapColorGetPaletteColor (sal_uInt16 nColor) const
 
sal_uInt16 GetBestPaletteIndex (const BitmapColor &rBitmapColor) const
 
const ColorMaskGetColorMask () const
 

Static Public Member Functions

static BitmapColor GetPixelForN1BitMsbPal (ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN8BitPal (ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN24BitTcBgr (ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN24BitTcRgb (ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcAbgr (ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcXbgr (ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcArgb (ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcXrgb (ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcBgra (ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcBgrx (ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcRgba (ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcRgbx (ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcMask (ConstScanline pScanline, tools::Long nX, const ColorMask &rMask)
 
static void SetPixelForN1BitMsbPal (Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN8BitPal (Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, 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 void SetPixelForN32BitTcAbgr (Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN32BitTcXbgr (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 SetPixelForN32BitTcXrgb (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 SetPixelForN32BitTcBgrx (Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN32BitTcRgba (Scanline pScanline, tools::Long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN32BitTcRgbx (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 FncGetPixel GetPixelFunction (ScanlineFormat nFormat)
 
static FncSetPixel SetPixelFunction (ScanlineFormat nFormat)
 

Protected Attributes

FncGetPixel mFncGetPixel
 
FncSetPixel mFncSetPixel
 
- Protected Attributes inherited from BitmapInfoAccess
Bitmap maBitmap
 
BitmapBuffermpBuffer
 
ColorMask maColorMask
 
BitmapAccessMode mnAccessMode
 

Private Member Functions

 BitmapReadAccess (const BitmapReadAccess &)=delete
 
BitmapReadAccessoperator= (const BitmapReadAccess &)=delete
 

Friends

class BitmapWriteAccess
 

Detailed Description

Definition at line 31 of file BitmapReadAccess.hxx.

Constructor & Destructor Documentation

◆ BitmapReadAccess() [1/2]

BitmapReadAccess::BitmapReadAccess ( Bitmap rBitmap,
BitmapAccessMode  nMode = BitmapAccessMode::Read 
)

◆ ~BitmapReadAccess()

BitmapReadAccess::~BitmapReadAccess ( )
overridevirtual

Definition at line 51 of file BitmapReadAccess.cxx.

◆ BitmapReadAccess() [2/2]

BitmapReadAccess::BitmapReadAccess ( const BitmapReadAccess )
privatedelete

Member Function Documentation

◆ GetBuffer()

Scanline BitmapReadAccess::GetBuffer ( ) const
inline

Definition at line 40 of file BitmapReadAccess.hxx.

References BitmapBuffer::mpBits, and BitmapInfoAccess::mpBuffer.

Referenced by writeWebp().

◆ GetColor() [1/2]

BitmapColor BitmapReadAccess::GetColor ( const Point point) const
inline

Definition at line 100 of file BitmapReadAccess.hxx.

References GetColor(), and point().

Referenced by GetColor().

◆ GetColor() [2/2]

BitmapColor BitmapReadAccess::GetColor ( tools::Long  nY,
tools::Long  nX 
) const
inline

◆ GetColorWithFallback()

BitmapColor BitmapReadAccess::GetColorWithFallback ( double  fY,
double  fX,
const BitmapColor rFallback 
) const

Get the color at coordinates fY, fX; if outside, return rFallback.

Automatically does the correct inside/outside checks, e.g. static_cast< sal_uInt32 >(-0.25) is 0, not -1 and has to be outside

Definition at line 226 of file BitmapReadAccess.cxx.

References GetColor(), mnHeight, mnWidth, and BitmapInfoAccess::mpBuffer.

◆ GetIndexFromData()

sal_uInt8 BitmapReadAccess::GetIndexFromData ( const sal_uInt8 pData,
tools::Long  nX 
) const
inline

◆ GetInterpolatedColorWithFallback()

BitmapColor BitmapReadAccess::GetInterpolatedColorWithFallback ( double  fY,
double  fX,
const BitmapColor rFallback 
) const

Get the interpolated color at coordinates fY, fX; if outside, return rFallback.

Definition at line 135 of file BitmapReadAccess.cxx.

References GetColor(), Color::Merge(), mnHeight, mnWidth, and BitmapInfoAccess::mpBuffer.

◆ GetPixel() [1/2]

BitmapColor BitmapReadAccess::GetPixel ( const Point point) const
inline

Definition at line 87 of file BitmapReadAccess.hxx.

References GetPixel(), and point().

Referenced by GetPixel().

◆ GetPixel() [2/2]

BitmapColor BitmapReadAccess::GetPixel ( tools::Long  nY,
tools::Long  nX 
) const
inline

◆ GetPixelForN1BitMsbPal()

BitmapColor BitmapReadAccess::GetPixelForN1BitMsbPal ( ConstScanline  pScanline,
tools::Long  nX,
const ColorMask rMask 
)
static

◆ GetPixelForN24BitTcBgr()

BitmapColor BitmapReadAccess::GetPixelForN24BitTcBgr ( ConstScanline  pScanline,
tools::Long  nX,
const ColorMask rMask 
)
static

◆ GetPixelForN24BitTcRgb()

BitmapColor BitmapReadAccess::GetPixelForN24BitTcRgb ( ConstScanline  pScanline,
tools::Long  nX,
const ColorMask rMask 
)
static

◆ GetPixelForN32BitTcAbgr()

BitmapColor BitmapReadAccess::GetPixelForN32BitTcAbgr ( ConstScanline  pScanline,
tools::Long  nX,
const ColorMask rMask 
)
static

◆ GetPixelForN32BitTcArgb()

BitmapColor BitmapReadAccess::GetPixelForN32BitTcArgb ( ConstScanline  pScanline,
tools::Long  nX,
const ColorMask rMask 
)
static

◆ GetPixelForN32BitTcBgra()

BitmapColor BitmapReadAccess::GetPixelForN32BitTcBgra ( ConstScanline  pScanline,
tools::Long  nX,
const ColorMask rMask 
)
static

◆ GetPixelForN32BitTcBgrx()

BitmapColor BitmapReadAccess::GetPixelForN32BitTcBgrx ( ConstScanline  pScanline,
tools::Long  nX,
const ColorMask rMask 
)
static

◆ GetPixelForN32BitTcMask()

BitmapColor BitmapReadAccess::GetPixelForN32BitTcMask ( ConstScanline  pScanline,
tools::Long  nX,
const ColorMask rMask 
)
static

◆ GetPixelForN32BitTcRgba()

BitmapColor BitmapReadAccess::GetPixelForN32BitTcRgba ( ConstScanline  pScanline,
tools::Long  nX,
const ColorMask rMask 
)
static

◆ GetPixelForN32BitTcRgbx()

BitmapColor BitmapReadAccess::GetPixelForN32BitTcRgbx ( ConstScanline  pScanline,
tools::Long  nX,
const ColorMask rMask 
)
static

◆ GetPixelForN32BitTcXbgr()

BitmapColor BitmapReadAccess::GetPixelForN32BitTcXbgr ( ConstScanline  pScanline,
tools::Long  nX,
const ColorMask rMask 
)
static

◆ GetPixelForN32BitTcXrgb()

BitmapColor BitmapReadAccess::GetPixelForN32BitTcXrgb ( ConstScanline  pScanline,
tools::Long  nX,
const ColorMask rMask 
)
static

◆ GetPixelForN8BitPal()

BitmapColor BitmapReadAccess::GetPixelForN8BitPal ( ConstScanline  pScanline,
tools::Long  nX,
const ColorMask rMask 
)
static

Definition at line 262 of file BitmapReadAccess.cxx.

Referenced by BitmapWriteAccess::CopyScanline(), and GetPixelFunction().

◆ GetPixelFromData()

BitmapColor BitmapReadAccess::GetPixelFromData ( const sal_uInt8 pData,
tools::Long  nX 
) const
inline

◆ GetPixelFunction()

FncGetPixel BitmapReadAccess::GetPixelFunction ( ScanlineFormat  nFormat)
static

◆ GetPixelIndex() [1/2]

sal_uInt8 BitmapReadAccess::GetPixelIndex ( const Point point) const
inline

Definition at line 107 of file BitmapReadAccess.hxx.

References GetPixelIndex(), and point().

◆ GetPixelIndex() [2/2]

sal_uInt8 BitmapReadAccess::GetPixelIndex ( tools::Long  nY,
tools::Long  nX 
) const
inline

◆ GetScanline()

Scanline BitmapReadAccess::GetScanline ( tools::Long  nY) const
inline

Definition at line 47 of file BitmapReadAccess.hxx.

References BitmapBuffer::mnFormat, mnHeight, BitmapBuffer::mnHeight, BitmapBuffer::mnScanlineSize, BitmapBuffer::mpBits, BitmapInfoAccess::mpBuffer, and TopDown.

Referenced by OutputDevice::BlendBitmap(), AlphaMask::BlendWith(), vcl::bitmap::CanvasCairoExtractBitmapData(), vcl::bitmap::CanvasExtractBitmapData(), BitmapEx::ChangeColorAlpha(), BitmapSymmetryCheck::checkImpl(), Bitmap::CombineOr(), vcl::bitmap::convertBitmap32To24Plus8(), Bitmap::CopyPixel(), Bitmap::CopyPixel_AlphaOptimized(), BitmapWriteAccess::CopyScanline(), Bitmap::CreateAlphaMask(), Bitmap::CreateMask(), Bitmap::CreateRegion(), Bitmap::Crop(), DetectEdges(), OutputDevice::EmulateDrawTransparent(), BitmapWriteAccess::Erase(), BitmapColorQuantizationFilter::execute(), BitmapMonochromeFilter::execute(), BitmapMosaicFilter::execute(), BitmapSepiaFilter::execute(), BitmapSimpleColorQuantizationFilter::execute(), BitmapDisabledImageFilter::execute(), BitmapFastScaleFilter::execute(), BitmapInterpolateScaleFilter::execute(), BitmapLightenFilter::execute(), BitmapMaskToAlphaFilter::execute(), BitmapWriteAccess::FillRect(), getColor(), BitmapEx::GetContour(), vcl::unotools::VclCanvasBitmap::getData(), vcl::unotools::VclCanvasBitmap::getPixel(), GetPixel(), JPEGWriter::GetScanline(), Bitmap::ImplConvertDown8BPP(), Bitmap::ImplConvertUp(), ImplVectorizer::ImplExpand(), Bitmap::ImplMakeGreyscales(), ImplVectorizer::ImplVectorize(), Octree::Octree(), vcl::pngWrite(), vcl::bitmap::readAlpha(), BitmapWriteAccess::SetPixel(), JPEGWriter::Write(), vcl::PDFWriterImpl::writeBitmapObject(), vcl::PDFWriterImpl::writeG4Stream(), and writeWebp().

◆ ImplGetBitmapBuffer()

BitmapBuffer * BitmapReadAccess::ImplGetBitmapBuffer ( ) const
inline

◆ operator=()

BitmapReadAccess & BitmapReadAccess::operator= ( const BitmapReadAccess )
privatedelete

◆ SetPixelForN1BitMsbPal()

void BitmapReadAccess::SetPixelForN1BitMsbPal ( Scanline  pScanline,
tools::Long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 251 of file BitmapReadAccess.cxx.

References BitmapColor::GetIndex().

Referenced by SetPixelFunction(), and StretchAndConvert().

◆ SetPixelForN24BitTcBgr()

void BitmapReadAccess::SetPixelForN24BitTcBgr ( Scanline  pScanline,
tools::Long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 287 of file BitmapReadAccess.cxx.

References Color::GetBlue(), Color::GetGreen(), and Color::GetRed().

Referenced by SetPixelFunction().

◆ SetPixelForN24BitTcRgb()

void BitmapReadAccess::SetPixelForN24BitTcRgb ( Scanline  pScanline,
tools::Long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 309 of file BitmapReadAccess.cxx.

References Color::GetBlue(), Color::GetGreen(), and Color::GetRed().

Referenced by SetPixelFunction().

◆ SetPixelForN32BitTcAbgr()

void BitmapReadAccess::SetPixelForN32BitTcAbgr ( Scanline  pScanline,
tools::Long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

◆ SetPixelForN32BitTcArgb()

void BitmapReadAccess::SetPixelForN32BitTcArgb ( Scanline  pScanline,
tools::Long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

◆ SetPixelForN32BitTcBgra()

void BitmapReadAccess::SetPixelForN32BitTcBgra ( Scanline  pScanline,
tools::Long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

◆ SetPixelForN32BitTcBgrx()

void BitmapReadAccess::SetPixelForN32BitTcBgrx ( Scanline  pScanline,
tools::Long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 455 of file BitmapReadAccess.cxx.

References Color::GetBlue(), Color::GetGreen(), and Color::GetRed().

Referenced by SetPixelFunction().

◆ SetPixelForN32BitTcMask()

void BitmapReadAccess::SetPixelForN32BitTcMask ( Scanline  pScanline,
tools::Long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 522 of file BitmapReadAccess.cxx.

References ColorMask::SetColorFor32Bit().

Referenced by SetPixelFunction().

◆ SetPixelForN32BitTcRgba()

void BitmapReadAccess::SetPixelForN32BitTcRgba ( Scanline  pScanline,
tools::Long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

◆ SetPixelForN32BitTcRgbx()

void BitmapReadAccess::SetPixelForN32BitTcRgbx ( Scanline  pScanline,
tools::Long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 504 of file BitmapReadAccess.cxx.

References Color::GetBlue(), Color::GetGreen(), and Color::GetRed().

Referenced by SetPixelFunction().

◆ SetPixelForN32BitTcXbgr()

void BitmapReadAccess::SetPixelForN32BitTcXbgr ( Scanline  pScanline,
tools::Long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 357 of file BitmapReadAccess.cxx.

References Color::GetBlue(), Color::GetGreen(), and Color::GetRed().

Referenced by SetPixelFunction().

◆ SetPixelForN32BitTcXrgb()

void BitmapReadAccess::SetPixelForN32BitTcXrgb ( Scanline  pScanline,
tools::Long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 406 of file BitmapReadAccess.cxx.

References Color::GetBlue(), Color::GetGreen(), and Color::GetRed().

Referenced by SetPixelFunction().

◆ SetPixelForN8BitPal()

void BitmapReadAccess::SetPixelForN8BitPal ( Scanline  pScanline,
tools::Long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 268 of file BitmapReadAccess.cxx.

References BitmapColor::GetIndex().

Referenced by SetPixelFunction().

◆ SetPixelFunction()

FncSetPixel BitmapReadAccess::SetPixelFunction ( ScanlineFormat  nFormat)
static

◆ SetPixelOnData()

void BitmapReadAccess::SetPixelOnData ( sal_uInt8 pData,
tools::Long  nX,
const BitmapColor rBitmapColor 
)
inline

Friends And Related Function Documentation

◆ BitmapWriteAccess

friend class BitmapWriteAccess
friend

Definition at line 33 of file BitmapReadAccess.hxx.

Member Data Documentation

◆ mFncGetPixel

FncGetPixel BitmapReadAccess::mFncGetPixel
protected

Definition at line 125 of file BitmapReadAccess.hxx.

Referenced by BitmapReadAccess(), GetPixel(), and GetPixelFromData().

◆ mFncSetPixel

FncSetPixel BitmapReadAccess::mFncSetPixel
protected

The documentation for this class was generated from the following files: