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

#include <bitmapaccess.hxx>

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

Public Member Functions

 BitmapReadAccess (Bitmap &rBitmap, BitmapAccessMode nMode=BitmapAccessMode::Read)
 
virtual ~BitmapReadAccess () override
 
Scanline GetBuffer () const
 
Scanline GetScanline (long nY) const
 
BitmapColor GetPixelFromData (const sal_uInt8 *pData, long nX) const
 
sal_uInt8 GetIndexFromData (const sal_uInt8 *pData, long nX) const
 
void SetPixelOnData (sal_uInt8 *pData, long nX, const BitmapColor &rBitmapColor)
 
BitmapColor GetPixel (long nY, long nX) const
 
BitmapColor GetColor (long nY, long nX) const
 
sal_uInt8 GetPixelIndex (long nY, long nX) 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...
 
SAL_DLLPRIVATE BitmapBufferImplGetBitmapBuffer () const
 
- Public Member Functions inherited from BitmapInfoAccess
 BitmapInfoAccess (Bitmap &rBitmap, BitmapAccessMode nMode=BitmapAccessMode::Info)
 
virtual ~BitmapInfoAccess ()
 
bool operator! () const
 
long Width () const
 
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)
 
bool HasPalette () const
 
const BitmapPaletteGetPalette () const
 
sal_uInt16 GetPaletteEntryCount () const
 
const BitmapColorGetPaletteColor (sal_uInt16 nColor) const
 
const BitmapColorGetBestPaletteColor (const BitmapColor &rBitmapColor) const
 
sal_uInt16 GetBestPaletteIndex (const BitmapColor &rBitmapColor) const
 
ColorMaskGetColorMask () const
 

Static Public Member Functions

static BitmapColor GetPixelForN1BitMsbPal (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN1BitLsbPal (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN4BitMsnPal (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN4BitLsnPal (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN8BitPal (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN8BitTcMask (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN16BitTcMsbMask (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN16BitTcLsbMask (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN24BitTcBgr (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN24BitTcRgb (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcAbgr (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcArgb (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcBgra (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcRgba (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static BitmapColor GetPixelForN32BitTcMask (ConstScanline pScanline, long nX, const ColorMask &rMask)
 
static void SetPixelForN1BitMsbPal (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN1BitLsbPal (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN4BitMsnPal (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN4BitLsnPal (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN8BitPal (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN8BitTcMask (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN16BitTcMsbMask (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN16BitTcLsbMask (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN24BitTcBgr (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN24BitTcRgb (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN32BitTcAbgr (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN32BitTcArgb (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN32BitTcBgra (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN32BitTcRgba (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 
static void SetPixelForN32BitTcMask (Scanline pScanline, long nX, const BitmapColor &rBitmapColor, const ColorMask &rMask)
 

Protected Member Functions

SAL_DLLPRIVATE bool ImplSetAccessPointers (ScanlineFormat nFormat)
 

Protected Attributes

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

Private Member Functions

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

Friends

class BitmapWriteAccess
 

Detailed Description

Definition at line 152 of file bitmapaccess.hxx.

Constructor & Destructor Documentation

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

Definition at line 109 of file bmpacc.cxx.

BitmapReadAccess::BitmapReadAccess ( const BitmapReadAccess )
privatedelete

Member Function Documentation

Scanline BitmapReadAccess::GetBuffer ( ) const
inline
BitmapColor BitmapReadAccess::GetColor ( long  nY,
long  nX 
) const
inline
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 307 of file bmpacc.cxx.

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

sal_uInt8 BitmapReadAccess::GetIndexFromData ( const sal_uInt8 pData,
long  nX 
) const
inline
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 218 of file bmpacc.cxx.

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

BitmapColor BitmapReadAccess::GetPixel ( long  nY,
long  nX 
) const
inline
BitmapColor BitmapReadAccess::GetPixelForN16BitTcLsbMask ( ConstScanline  pScanline,
long  nX,
const ColorMask rMask 
)
static
BitmapColor BitmapReadAccess::GetPixelForN16BitTcMsbMask ( ConstScanline  pScanline,
long  nX,
const ColorMask rMask 
)
static
BitmapColor BitmapReadAccess::GetPixelForN1BitLsbPal ( ConstScanline  pScanline,
long  nX,
const ColorMask rMask 
)
static

Definition at line 38 of file bmpacc2.cxx.

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

BitmapColor BitmapReadAccess::GetPixelForN1BitMsbPal ( ConstScanline  pScanline,
long  nX,
const ColorMask rMask 
)
static
BitmapColor BitmapReadAccess::GetPixelForN24BitTcBgr ( ConstScanline  pScanline,
long  nX,
const ColorMask rMask 
)
static
BitmapColor BitmapReadAccess::GetPixelForN24BitTcRgb ( ConstScanline  pScanline,
long  nX,
const ColorMask rMask 
)
static
BitmapColor BitmapReadAccess::GetPixelForN32BitTcAbgr ( ConstScanline  pScanline,
long  nX,
const ColorMask rMask 
)
static

Definition at line 182 of file bmpacc2.cxx.

References vcl::bitmap::unpremultiply().

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

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

Definition at line 209 of file bmpacc2.cxx.

References vcl::bitmap::unpremultiply().

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

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

Definition at line 236 of file bmpacc2.cxx.

References vcl::bitmap::unpremultiply().

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

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

Definition at line 290 of file bmpacc2.cxx.

References ColorMask::GetColorFor32Bit().

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

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

Definition at line 263 of file bmpacc2.cxx.

References vcl::bitmap::unpremultiply().

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

BitmapColor BitmapReadAccess::GetPixelForN4BitLsnPal ( ConstScanline  pScanline,
long  nX,
const ColorMask rMask 
)
static

Definition at line 74 of file bmpacc2.cxx.

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

BitmapColor BitmapReadAccess::GetPixelForN4BitMsnPal ( ConstScanline  pScanline,
long  nX,
const ColorMask rMask 
)
static

Definition at line 53 of file bmpacc2.cxx.

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

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

Definition at line 95 of file bmpacc2.cxx.

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

BitmapColor BitmapReadAccess::GetPixelForN8BitTcMask ( ConstScanline  pScanline,
long  nX,
const ColorMask rMask 
)
static

Definition at line 105 of file bmpacc2.cxx.

References ColorMask::GetColorFor8Bit().

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

BitmapColor BitmapReadAccess::GetPixelFromData ( const sal_uInt8 pData,
long  nX 
) const
inline
sal_uInt8 BitmapReadAccess::GetPixelIndex ( long  nY,
long  nX 
) const
inline
Scanline BitmapReadAccess::GetScanline ( long  nY) const
inline

Definition at line 167 of file bitmapaccess.hxx.

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

Referenced by Bitmap::Adjust(), BitmapEx::AdjustTransparency(), Bitmap::Blend(), OutputDevice::BlendBitmap(), OutputDevice::BlendBitmapWithAlpha(), vcl::bitmap::CanvasCairoExtractBitmapData(), vcl::bitmap::CanvasTransformBitmap(), BitmapSymmetryCheck::checkImpl(), Bitmap::CombineSimple(), vcl::bitmap::convertBitmap32To24Plus8(), OpenGLHelper::ConvertBufferToBitmapEx(), Bitmap::CopyPixel(), Bitmap::CopyPixel_AlphaOptimized(), BitmapWriteAccess::CopyScanline(), createBlendFrame(), vcl::bitmap::CreateFromData(), Bitmap::CreateMask(), Bitmap::CreateRegion(), Bitmap::Crop(), DetectEdges(), Bitmap::Dither(), vcl::bitmap::DrawAlphaBitmapAndAlphaGradient(), vcl::bitmap::DrawAndClipBitmap(), OutputDevice::EmulateDrawTransparent(), BitmapWriteAccess::Erase(), BitmapLightenFilter::execute(), BitmapDisabledImageFilter::execute(), BitmapPopArtFilter::execute(), BitmapColorizeFilter::execute(), BitmapSolarizeFilter::execute(), BitmapFastScaleFilter::execute(), BitmapInterpolateScaleFilter::execute(), BitmapAlphaClampFilter::execute(), BitmapColorQuantizationFilter::execute(), BitmapSeparableUnsharpenFilter::execute(), BitmapSimpleColorQuantizationFilter::execute(), BitmapMosaicFilter::execute(), BitmapMonochromeFilter::execute(), Bitmap::Expand(), GIFReader::FillImages(), BitmapWriteAccess::FillRect(), BitmapEx::GetContour(), vcl::unotools::VclCanvasBitmap::getData(), vcl::unotools::VclCanvasBitmap::getPixel(), GetPixel(), JPEGWriter::GetScanline(), Bitmap::ImplConvertDown(), Bitmap::ImplConvertGhosted(), Bitmap::ImplConvertUp(), ImplVectorizer::ImplExpand(), vcl::PNGWriterImpl::ImplGetFilter(), XPMReader::ImplGetScanLine(), Bitmap::ImplMakeGreyscales(), ImplVectorizer::ImplVectorize(), Bitmap::Invert(), Bitmap::Mirror(), BitmapEx::ModifyBitmapEx(), Octree::Octree(), XBMReader::ParseData(), vcl::bitmap::readAlpha(), AlphaMask::Replace(), Bitmap::Replace(), BitmapEx::setAlphaFrom(), BitmapWriteAccess::SetPixel(), JPEGWriter::Write(), vcl::PDFWriterImpl::writeBitmapObject(), and vcl::PDFWriterImpl::writeG4Stream().

SAL_DLLPRIVATE BitmapBuffer* BitmapReadAccess::ImplGetBitmapBuffer ( ) const
inline

Definition at line 239 of file bitmapaccess.hxx.

References BitmapInfoAccess::mpBuffer.

Referenced by ImplFastBitmapBlending().

bool BitmapReadAccess::ImplSetAccessPointers ( ScanlineFormat  nFormat)
protected
BitmapReadAccess& BitmapReadAccess::operator= ( const BitmapReadAccess )
privatedelete
void BitmapReadAccess::SetPixelForN16BitTcLsbMask ( Scanline  pScanline,
long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 137 of file bmpacc2.cxx.

References ColorMask::SetColorFor16BitLSB().

Referenced by ImplSetAccessPointers().

void BitmapReadAccess::SetPixelForN16BitTcMsbMask ( Scanline  pScanline,
long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 125 of file bmpacc2.cxx.

References ColorMask::SetColorFor16BitMSB().

Referenced by ImplSetAccessPointers().

void BitmapReadAccess::SetPixelForN1BitLsbPal ( Scanline  pScanline,
long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 43 of file bmpacc2.cxx.

References BitmapColor::GetIndex().

Referenced by ImplSetAccessPointers().

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

Definition at line 28 of file bmpacc2.cxx.

References BitmapColor::GetIndex().

Referenced by ImplSetAccessPointers(), and StretchAndConvert().

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

Definition at line 154 of file bmpacc2.cxx.

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

Referenced by ImplSetAccessPointers().

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

Definition at line 174 of file bmpacc2.cxx.

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

Referenced by ImplSetAccessPointers().

void BitmapReadAccess::SetPixelForN32BitTcAbgr ( Scanline  pScanline,
long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static
void BitmapReadAccess::SetPixelForN32BitTcArgb ( Scanline  pScanline,
long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static
void BitmapReadAccess::SetPixelForN32BitTcBgra ( Scanline  pScanline,
long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static
void BitmapReadAccess::SetPixelForN32BitTcMask ( Scanline  pScanline,
long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 297 of file bmpacc2.cxx.

References ColorMask::SetColorFor32Bit().

Referenced by ImplSetAccessPointers().

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

Definition at line 79 of file bmpacc2.cxx.

References BitmapColor::GetIndex().

Referenced by ImplSetAccessPointers().

void BitmapReadAccess::SetPixelForN4BitMsnPal ( Scanline  pScanline,
long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 58 of file bmpacc2.cxx.

References BitmapColor::GetIndex().

Referenced by ImplSetAccessPointers().

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

Definition at line 100 of file bmpacc2.cxx.

References BitmapColor::GetIndex().

Referenced by ImplSetAccessPointers().

void BitmapReadAccess::SetPixelForN8BitTcMask ( Scanline  pScanline,
long  nX,
const BitmapColor rBitmapColor,
const ColorMask rMask 
)
static

Definition at line 112 of file bmpacc2.cxx.

References ColorMask::SetColorFor8Bit().

Referenced by ImplSetAccessPointers().

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

Friends And Related Function Documentation

friend class BitmapWriteAccess
friend

Definition at line 154 of file bitmapaccess.hxx.

Member Data Documentation

FncGetPixel BitmapReadAccess::mFncGetPixel
protected

Definition at line 232 of file bitmapaccess.hxx.

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

FncSetPixel BitmapReadAccess::mFncSetPixel
protected

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