20 #ifndef INCLUDED_VCL_INC_SCANLINEWRITER_HXX
21 #define INCLUDED_VCL_INC_SCANLINEWRITER_HXX
41 , mnColorsPerByte(nColorsPerByte)
45 , mnColorBitMask((1 << mnColorBitSize) - 1)
46 , mpCurrentScanline(nullptr)
56 return std::make_unique<ScanlineWriter>(aPalette, 8);
58 return std::make_unique<ScanlineWriter>(aPalette, 2);
60 return std::make_unique<ScanlineWriter>(aPalette, 1);
75 mpCurrentScanline[nScanlineIndex] &= ~(mnColorBitMask << nShift);
76 mpCurrentScanline[nScanlineIndex] |= (nColorIndex &
mnColorBitMask) << nShift;
83 mpCurrentScanline = pScanline;
sal_uInt8 const mnColorsPerByte
void nextLine(sal_uInt8 *pScanline)
void writeRGB(sal_uInt8 nR, sal_uInt8 nG, sal_uInt8 nB)
sal_uInt8 const mnColorBitSize
BitmapPalette & maPalette
sal_uInt8 * mpCurrentScanline
sal_uInt16 GetBestIndex(const BitmapColor &rCol) const
static std::unique_ptr< ScanlineWriter > Create(sal_uInt16 nBits, BitmapPalette &aPalette)
ScanlineWriter(BitmapPalette &aPalette, sal_Int8 nColorsPerByte)
sal_uInt8 const mnColorBitMask