CBitwiseBitmap Class Reference

class CBitwiseBitmap

BitGdi bitmap class (pseudo-CXxx class). WARNING: Class for internal use ONLY. Compatibility is not guaranteed in future releases.

Public Member Functions
IMPORT_C TIntCheckBackgroundCompressData()
IMPORT_C TIntCompressData()
IMPORT_C TIntCompressData(TBitmapfileCompressionScheme)
IMPORT_C TIntDataStride()
IMPORT_C TDisplayModeDisplayMode()
IMPORT_C voidExternalizeL(RWriteStream &, const CFbsBitmap &)
IMPORT_C voidExternalizeRectangleL(RWriteStream &, const TRect &, const CFbsBitmap &)
IMPORT_C voidGetPixel(TRgb &, const TPoint &, TUint32 *, CFbsRasterizer *)
IMPORT_C voidGetScanLine(TDes8 &, const TPoint &, TInt, TBool, const TPoint &, TDisplayMode, TUint32 *, TLineScanningPosition &)
IMPORT_C voidGetScanLine(TUint32 *&, TDes8 &, const TPoint &, TInt, TBool, const TPoint &, TDisplayMode)
IMPORT_C voidGetScanLine(TDes8 &, const TPoint &, TInt, TBool, const TPoint &, TDisplayMode, TUint32 *)
IMPORT_C TIntGetScanLinePtr(TUint32 *&, TPoint &, TInt, TUint32 *, TLineScanningPosition &)
IMPORT_C TIntGetScanLinePtr(TUint32 *&, TInt &, TPoint &, TUint32 *, TLineScanningPosition &)
IMPORT_C voidGetVerticalScanLine(TDes8 &, TInt, TBool, const TPoint &, TDisplayMode, TUint32 *, CFbsRasterizer *)
IMPORT_C TIntHardwareBitmapHandle()
IMPORT_C SEpocBitmapHeaderHeader()
IMPORT_C TIntHorizontalPixelsToTwips(TInt)
IMPORT_C TIntHorizontalTwipsToPixels(TInt)
IMPORT_C voidInternalizeHeaderL(RReadStream &, SEpocBitmapHeader &)
IMPORT_C voidInternalizeL(RReadStream &)
IMPORT_C TBoolIsCompressed()
IMPORT_C TBoolIsCompressedInRAM()
IMPORT_C TBoolIsLargeBitmap()
IMPORT_C TBoolIsMonochrome(TUint32 *)
IMPORT_C TUint32 *ScanLineAddress(TUint32 *, TUint)
IMPORT_C voidSetCompressionBookmark(TLineScanningPosition &, TUint32 *, const CFbsBitmap *)
IMPORT_C TSizeSizeInPixels()
IMPORT_C TSizeSizeInTwips()
IMPORT_C voidStretchScanLine(TDes8 &, const TPoint &, TInt, TInt, TInt, TInt, TInt, const TPoint &, TDisplayMode, TUint32 *)
IMPORT_C voidStretchScanLine(TDes8 &, const TPoint &, TInt, TInt, TInt, TInt, TInt, const TPoint &, TDisplayMode, TUint32 *, TLineScanningPosition &)
IMPORT_C TUidUid()
IMPORT_C TIntVerticalPixelsToTwips(TInt)
IMPORT_C TIntVerticalTwipsToPixels(TInt)
Private Member Functions
CBitwiseBitmap(RHeap *, CChunkPile *)
~CBitwiseBitmap()
voidAdjustXCoord(TInt &)
voidBitmapFill16(TUint16 *, TInt, TUint16)
voidBitmapFill32(TUint32 *, TInt, TUint32)
TInt Bpp(TDisplayMode)
TInt ByteWidth(TInt, TDisplayMode)
voidChangeDisplayMode(TDisplayMode, TInt, TUint8 *, TUint32 *, TInt, TInt, TInt)
voidCheckHeaderIsValidL(const SEpocBitmapHeader &)
TBool ColorAlphaPointerCompare(TUint8 *, TUint8, TUint8, TUint8, TUint8)
TInt CompressedFormatInfo(TDisplayMode, TInt &, TInt &)
TBitmapfileCompression CompressionType(TInt, TInt)
IMPORT_C TIntConstruct(const TSize &, TDisplayMode, TUid)
IMPORT_C TIntConstructExtended(const TSize &, TDisplayMode, TUid, TInt)
IMPORT_C voidConstructL(RFs &, const TDesC &, TInt32, TUint)
IMPORT_C voidConstructL(RFile &, TInt32, TUint)
IMPORT_C voidConstructL(CShiftedFileStore *, TStreamId)
IMPORT_C TIntCopyData(const CBitwiseBitmap &)
TUint32 *DataAddress()
TDisplayMode DisplayMode(TInt, TInt)
TInt DisplayModeArgCheck(TDisplayMode, TUint32 *)
voidDoCompressScanLine(TDes8 &, TInt, TInt, TInt, TInt, TInt, TInt, TInt, const TPoint &, TDisplayMode, TUint32 *, TLineScanningPosition &)
voidDoDecompressByteData(TUint8 *, TInt, TUint8 *, TInt)
voidDoDecompressByteDataAltL(RReadStream &, TInt, TUint32 *)
voidDoDecompressSixteenBitData(TUint8 *, TInt, TUint8 *, TInt)
voidDoDecompressSixteenBitDataAltL(RReadStream &, TInt, TUint32 *)
voidDoDecompressThirtyTwoABitData(TUint8 *, TInt, TUint8 *, TInt)
voidDoDecompressThirtyTwoABitDataAltL(RReadStream &, TInt, TUint32 *)
voidDoDecompressThirtyTwoUBitData(TUint8 *, TInt, TUint8 *, TInt)
voidDoDecompressThirtyTwoUBitDataAltL(RReadStream &, TInt, TUint32 *)
voidDoDecompressTwelveBitData(TUint8 *, TInt, TUint8 *, TInt)
voidDoDecompressTwelveBitDataAltL(RReadStream &, TInt, TUint32 *)
voidDoDecompressTwentyFourBitData(TUint8 *, TInt, TUint8 *, TInt)
voidDoDecompressTwentyFourBitDataAltL(RReadStream &, TInt, TUint32 *)
voidDoExternalizeByteDataCompressedL(RWriteStream &, TUint8 *, TInt)
voidDoExternalizeDataCompressedL(RWriteStream &, TUint8 *, TInt)
voidDoExternalizeSixteenBitDataCompressedL(RWriteStream &, TUint8 *, TInt)
voidDoExternalizeThirtyTwoABitDataCompressedL(RWriteStream &, TUint8 *, TInt)
voidDoExternalizeThirtyTwoUBitDataCompressedL(RWriteStream &, TUint8 *, TInt)
voidDoExternalizeTwelveBitDataCompressedL(RWriteStream &, TUint8 *, TInt)
voidDoExternalizeTwentyFourBitDataCompressedL(RWriteStream &, TUint8 *, TInt)
TInt DoGetScanLinePtr(TUint32 *&, TPoint &, TInt, TUint32 *, TLineScanningPosition &)
voidDoInternalizeCompressedDataL(RReadStream &, TInt, TUint32 *, TBitmapfileCompression)
voidDoInternalizeL(RReadStream &, TInt, TUint32 *)
voidDoStretchScanLine(TDes8 &, TInt, TInt, TInt, TInt, TInt, TInt, TInt, const TPoint &, TDisplayMode, TUint32 *, TLineScanningPosition &)
TExtra *Extra()
voidGenerateLineFromCompressed24BitData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)
voidGenerateLineFromCompressed32ABitData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)
voidGenerateLineFromCompressed32UBitData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)
voidGenerateLineFromCompressedEightBitData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)
voidGenerateLineFromCompressedSixteenBitData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)
voidGenerateLineFromCompressedTwelveBitData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)
voidGenerateLineFromPaletteCompressedData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)
TUint8 GetGrayPixelEx(TInt, TUint32 *)
voidGetLineScanPos(TLineScanningPosition &, const TCompressionBookMark *&, const TUint8 *)
TRgb GetRgbPixelEx(TInt, TUint32 *)
voidGetRgbPixelExMany(TInt, TUint32 *, TUint32 *, TInt)
voidGetRgbPixelExMany16M(TInt, TUint32 *, TUint8 *, TInt)
voidGetRgbPixelExMany16MAP(TInt, TUint32 *, TUint32 *, TInt)
voidGetScanLineColor16(TDes8 &, const TPoint &, TInt, TUint32 *)
voidGetScanLineColor16M(TDes8 &, const TPoint &, TInt, TUint32 *)
voidGetScanLineColor16MA(TDes8 &, const TPoint &, TInt, TUint32 *)
voidGetScanLineColor16MAP(TDes8 &, const TPoint &, TInt, TUint32 *)
voidGetScanLineColor16MU(TDes8 &, const TPoint &, TInt, TUint32 *)
voidGetScanLineColor256(TDes8 &, const TPoint &, TInt, TUint32 *)
voidGetScanLineColor4K(TDes8 &, const TPoint &, TInt, TUint32 *)
voidGetScanLineColor64K(TDes8 &, const TPoint &, TInt, TUint32 *)
voidGetScanLineColorRgb(TDes8 &, const TPoint &, TInt, TUint32 *)
voidGetScanLineExBits(TDes8 &, TInt, TInt, TUint32 *)
voidGetScanLineExBytes(TDes8 &, TInt, TInt, TUint32 *)
voidGetScanLineGray16(TDes8 &, const TPoint &, TInt, TUint32 *)
voidGetScanLineGray2(TDes8 &, const TPoint &, TInt, TBool, const TPoint &, TUint32 *)
voidGetScanLineGray256(TDes8 &, const TPoint &, TInt, TUint32 *)
voidGetScanLineGray4(TDes8 &, const TPoint &, TInt, TBool, const TPoint &, TUint32 *)
TUint32 HashTo1bpp(TUint32, TBool, TBool)
TUint32 HashTo2bpp(TUint32, TInt)
TDisplayMode InitialDisplayMode()
TInt IsColor(TDisplayMode)
TBool IsWordMonochrome(TUint32)
voidPaletteAssign16BitColor(TUint8 *&, TUint32)
voidPaletteAssign24BitColor(TUint8 *&, TUint32)
voidPaletteAssign32BitColor(TUint8 *&, TUint32)
TUint PaletteBitsPerPixel(TInt)
TUint PaletteBytesPerPixel(TInt)
TInt PaletteCompress()
voidPaletteDecode1PixelPerByte(TUint8 *, TUint32 *, TUint8 *&, TAssignFunction)
voidPaletteDecode2PixelPerByte(TUint8 *, TUint32 *, TUint8 *&, TAssignFunction)
voidPaletteDecode4PixelPerByte(TUint8 *, TUint32 *, TUint8 *&, TAssignFunction)
voidPaletteDecode8PixelPerByte(TUint8 *, TUint32 *, TUint8 *&, TAssignFunction)
voidPaletteDecodeAndAssignGeneric(TUint8 *, TUint32 *, TUint8 *&, TUint, TUint, TUint, TUint)
IMPORT_C voidReset()
TInt SetDisplayMode(TDisplayMode, TUint32 *)
TInt SizeOfByteDataCompressed(TUint8 *, TInt)
TInt SizeOfDataCompressed(TUint8 *, TInt)
TInt SizeOfSixteenBitDataCompressed(TUint8 *, TInt)
TInt SizeOfThirtyTwoABitDataCompressed(TUint8 *, TInt)
TInt SizeOfThirtyTwoUBitDataCompressed(TUint8 *, TInt)
TInt SizeOfTwelveBitDataCompressed(TUint8 *, TInt)
TInt SizeOfTwentyFourBitDataCompressed(TUint8 *, TInt)
TInt SwapWidthAndHeight(TUint32 *)
TBool TrueColorPointerCompare(TUint8 *, TUint8, TUint8, TUint8)
voidUpdateBitmapProperties(TDisplayMode)
voidUpdateBookMark(const TLineScanningPosition &, TCompressionBookMark *, const TUint8 *)
voidUpdatePaddingData(TUint32 *)
voidWhiteFill(TUint8 *, TInt, TDisplayMode)
IMPORT_C voidoperator delete(TAny *)
voidoperator delete(TAny *, TAny *)
Private Attributes
TInt iByteWidth
TInt iDataOffset
SEpocBitmapHeader iHeader
RHeap *iHeap
TBool iIsCompressedInRAM
CChunkPile *iPile
struct CBitwiseBitmap::TSettingsiSettings
TInt iSpare
TUid iUid

Constructor & Destructor Documentation

CBitwiseBitmap(RHeap *, CChunkPile *)

IMPORT_CCBitwiseBitmap(RHeap *aHeap,
CChunkPile *aPile
)[private]

Parameters

RHeap * aHeap
CChunkPile * aPile

~CBitwiseBitmap()

IMPORT_C~CBitwiseBitmap()[private]

Member Functions Documentation

AdjustXCoord(TInt &)

voidAdjustXCoord(TInt &aX)const [private]

The method adjusts specified X coordinate if it is negative or outside the bitmap.

Parameters

TInt & aX- a reference to x coordinate - the value might be changed after the method call.

BitmapFill16(TUint16 *, TInt, TUint16)

voidBitmapFill16(TUint16 *aDestPtr16,
TIntaCount,
TUint16aValue16
)[private, static, inline]

Fills the 16bit pixels into the destination pointer This method uses the concept of Duff's Device

Parameters

TUint16 * aDestPtr16pointer to 16bit destination buffer.
TInt aCountNumber of 16bit pixels to be copied.
TUint16 aValue1616bit pixel data.

BitmapFill32(TUint32 *, TInt, TUint32)

voidBitmapFill32(TUint32 *aDestPtr32,
TIntaCount,
TUint32aValue32
)[private, static]

Fills the 32bit pixels into the destination pointer This method uses the concept of Duff's Device

Parameters

TUint32 * aDestPtr32pointer to 32bit destination buffer.
TInt aCountNumber of 32bit pixels to be copied.
TUint32 aValue3232bit pixel data.

Bpp(TDisplayMode)

TInt Bpp(TDisplayModeaDispMode)[private, static]

Parameters

TDisplayMode aDispMode

ByteWidth(TInt, TDisplayMode)

TInt ByteWidth(TIntaPixelWidth,
TDisplayModeaDispMode
)[private, static]

Parameters

TInt aPixelWidth
TDisplayMode aDispMode

ChangeDisplayMode(TDisplayMode, TInt, TUint8 *, TUint32 *, TInt, TInt, TInt)

voidChangeDisplayMode(TDisplayModeaNewDisplayMode,
TIntaScanLineWidthNew,
TUint8 *aDataAddrNew,
TUint32 *aDataAddress,
TIntaYStart,
TIntaYInc,
TIntaYEnd
)[private]

The method changes current display mode of the bitmap converting bitmap scan lines color and writting the resulting scan line to the same memory occupied by the bitmap. No additional memory is allocated. Note: The method must be called only from CBitwiseBitmap::SetDisplayMode method. CBitwiseBitmap::SetDisplayMode.

Parameters

TDisplayMode aNewDisplayModeRequested display mode.
TInt aScanLineWidthNewScan line width - with the new display mode. It could be negative if the new display mode is with less bits per pixel than the existing display mode.
TUint8 * aDataAddrNewNew bitmap data - Points to the place where the copying has to start to.
TUint32 * aDataAddressBitmap data address.
TInt aYStartFirst scan line number.
TInt aYIncScan line increment value.
TInt aYEndLast scan line number.

CheckBackgroundCompressData()

IMPORT_C TIntCheckBackgroundCompressData()

Set a flag to indicate that this bitmap has to be compressed in the FBServer background thread

CheckHeaderIsValidL(const SEpocBitmapHeader &)

voidCheckHeaderIsValidL(const SEpocBitmapHeader &aHeader)[private, static]

Parameters

const SEpocBitmapHeader & aHeader

ColorAlphaPointerCompare(TUint8 *, TUint8, TUint8, TUint8, TUint8)

TBool ColorAlphaPointerCompare(TUint8 *aColorPointer,
TUint8aComponent1,
TUint8aComponent2,
TUint8aComponent3,
TUint8aComponent4
)const [private]

Parameters

TUint8 * aColorPointer
TUint8 aComponent1
TUint8 aComponent2
TUint8 aComponent3
TUint8 aComponent4

CompressData()

IMPORT_C TIntCompressData()

Compress a bitmap if possible. If the bitmap is already compressed, or if compression yields no decrease in size, do nothing, but return success (KErrNone).

CompressData(TBitmapfileCompressionScheme)

IMPORT_C TIntCompressData(TBitmapfileCompressionSchemeaScheme)

Compress a bitmap if possible. If the bitmap is already compressed, or if compression yields no decrease in size, do nothing, but return success (KErrNone).

Parameters

TBitmapfileCompressionScheme aSchemeThe type of bitmap file compression.

CompressedFormatInfo(TDisplayMode, TInt &, TInt &)

TInt CompressedFormatInfo(TDisplayModeaDispMode,
TInt &aBytesPerPack,
TInt &aBytesPerCompressed
)[private, static]

Parameters

TDisplayMode aDispMode
TInt & aBytesPerPack
TInt & aBytesPerCompressed

CompressionType(TInt, TInt)

TBitmapfileCompression CompressionType(TIntaBpp,
TIntaColor
)[private, static]

Parameters

TInt aBpp
TInt aColor

Construct(const TSize &, TDisplayMode, TUid)

IMPORT_C TIntConstruct(const TSize &aSize,
TDisplayModeaDispMode,
TUidaCreatorUid
)[private]

Parameters

const TSize & aSize
TDisplayMode aDispMode
TUid aCreatorUid

ConstructExtended(const TSize &, TDisplayMode, TUid, TInt)

IMPORT_C TIntConstructExtended(const TSize &aSize,
TDisplayModeaDispMode,
TUidaType,
TIntaDataSize
)[private]

Parameters

const TSize & aSize
TDisplayMode aDispMode
TUid aType
TInt aDataSize

ConstructL(RFs &, const TDesC &, TInt32, TUint)

IMPORT_C voidConstructL(RFs &aFs,
const TDesC &aFilename,
TInt32aId,
TUintaFileOffset
)[private]

Parameters

RFs & aFs
const TDesC & aFilename
TInt32 aId
TUint aFileOffset

ConstructL(RFile &, TInt32, TUint)

IMPORT_C voidConstructL(RFile &aFile,
TInt32aId,
TUintaFileOffset
)[private]

Parameters

RFile & aFile
TInt32 aId
TUint aFileOffset

ConstructL(CShiftedFileStore *, TStreamId)

IMPORT_C voidConstructL(CShiftedFileStore *aFileStore,
TStreamIdaStreamId
)[private]

Parameters

CShiftedFileStore * aFileStore
TStreamId aStreamId

CopyData(const CBitwiseBitmap &)

IMPORT_C TIntCopyData(const CBitwiseBitmap &aSourceBitmap)[private]

Parameters

const CBitwiseBitmap & aSourceBitmap

DataAddress()

TUint32 *DataAddress()const [private]

DataStride()

IMPORT_C TIntDataStride()const

DisplayMode()

IMPORT_C TDisplayModeDisplayMode()const

DisplayMode(TInt, TInt)

TDisplayMode DisplayMode(TIntaBpp,
TIntaColor
)[private, static]

Parameters

TInt aBpp
TInt aColor

DisplayModeArgCheck(TDisplayMode, TUint32 *)

TInt DisplayModeArgCheck(TDisplayModeaDisplayMode,
TUint32 *aDataAddress
)const [private]

The method is caled from CBitwiseBitmap::SetDisplayMode() and checks the aDisplayMode argument and bitmap internal state. Requested display mode can't be greater (bpp value) than the initial display mode. Note: The method must be called only from CBitwiseBitmap::SetDisplayMode method. CBitwiseBitmap::SetDisplayMode.

Parameters

TDisplayMode aDisplayModeRequested display mode.
TUint32 * aDataAddressBitmap data address.

DoCompressScanLine(TDes8 &, TInt, TInt, TInt, TInt, TInt, TInt, TInt, const TPoint &, TDisplayMode, TUint32 *, TLineScanningPosition &)

voidDoCompressScanLine(TDes8 &aBuf,
TIntx,
TInty,
TIntaClipStrchX,
TIntaClipStrchLen,
TIntaStretchLength,
TIntaOrgX,
TIntaOrgLen,
const TPoint &aDitherOffset,
TDisplayModeaDispMode,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const [private]

Parameters

TDes8 & aBuf
TInt x
TInt y
TInt aClipStrchX
TInt aClipStrchLen
TInt aStretchLength
TInt aOrgX
TInt aOrgLen
const TPoint & aDitherOffset
TDisplayMode aDispMode
TUint32 * aBase
TLineScanningPosition & aLineScanningPosition

DoDecompressByteData(TUint8 *, TInt, TUint8 *, TInt)

voidDoDecompressByteData(TUint8 *aDestBuffer,
TIntaDestSize,
TUint8 *aSrceBuffer,
TIntaSrceSize
)[private]

Parameters

TUint8 * aDestBuffer
TInt aDestSize
TUint8 * aSrceBuffer
TInt aSrceSize

DoDecompressByteDataAltL(RReadStream &, TInt, TUint32 *)

voidDoDecompressByteDataAltL(RReadStream &aStream,
TIntaSrceSizeInBytes,
TUint32 *aBase
)[private]

Parameters

RReadStream & aStream
TInt aSrceSizeInBytes
TUint32 * aBase

DoDecompressSixteenBitData(TUint8 *, TInt, TUint8 *, TInt)

voidDoDecompressSixteenBitData(TUint8 *aDestBuffer,
TIntaDestSize,
TUint8 *aSrceBuffer,
TIntaSrceSize
)[private]

The function decodes 24-bit compressed buffer to the 16-bit stream with unused top bytes by using RLE compression algorithm

Parameters

TUint8 * aDestBuffer
TInt aDestSize
TUint8 * aSrceBuffer
TInt aSrceSize

DoDecompressSixteenBitDataAltL(RReadStream &, TInt, TUint32 *)

voidDoDecompressSixteenBitDataAltL(RReadStream &aStream,
TIntaSrceSizeInBytes,
TUint32 *aBase
)[private]

The alternative decoding function which decompresses 24-bit buffer to the 16-bit stream with unused top bytes by using RLE compression algorithm. The function is used under low memory conditions.

Parameters

RReadStream & aStream
TInt aSrceSizeInBytes
TUint32 * aBase

DoDecompressThirtyTwoABitData(TUint8 *, TInt, TUint8 *, TInt)

voidDoDecompressThirtyTwoABitData(TUint8 *aDestBuffer,
TIntaDestSize,
TUint8 *aSrceBuffer,
TIntaSrceSize
)[private]

The function decodes 32-bit compressed buffer (where top bytes are used as alpha channel) to the 32-bit stream by using RLE compression algorithm

Parameters

TUint8 * aDestBuffer
TInt aDestSize
TUint8 * aSrceBuffer
TInt aSrceSize

DoDecompressThirtyTwoABitDataAltL(RReadStream &, TInt, TUint32 *)

voidDoDecompressThirtyTwoABitDataAltL(RReadStream &aStream,
TIntaSrceSizeInBytes,
TUint32 *aBase
)[private]

The alternative decoding function which decompresses 32-bit buffer (where top bytes are used as alpha channel) to the 32-bit stream by using RLE compression algorithm. The function is using in case of memory shortage.

Parameters

RReadStream & aStream
TInt aSrceSizeInBytes
TUint32 * aBase

DoDecompressThirtyTwoUBitData(TUint8 *, TInt, TUint8 *, TInt)

voidDoDecompressThirtyTwoUBitData(TUint8 *aDestBuffer,
TIntaDestSize,
TUint8 *aSrceBuffer,
TIntaSrceSize
)[private]

The function decodes 24-bit compressed buffer to the 32-bit stream with unused top bytes by using RLE compression algorithm

Parameters

TUint8 * aDestBuffer
TInt aDestSize
TUint8 * aSrceBuffer
TInt aSrceSize

DoDecompressThirtyTwoUBitDataAltL(RReadStream &, TInt, TUint32 *)

voidDoDecompressThirtyTwoUBitDataAltL(RReadStream &aStream,
TIntaSrceSizeInBytes,
TUint32 *aBase
)[private]

The alternative decoding function which decompresses 24-bit buffer to the 32-bit stream with unused top bytes by using RLE compression algorithm. The function is using in case of memory shortage.

Parameters

RReadStream & aStream
TInt aSrceSizeInBytes
TUint32 * aBase

DoDecompressTwelveBitData(TUint8 *, TInt, TUint8 *, TInt)

voidDoDecompressTwelveBitData(TUint8 *aDestBuffer,
TIntaDestSize,
TUint8 *aSrceBuffer,
TIntaSrceSize
)[private]

Parameters

TUint8 * aDestBuffer
TInt aDestSize
TUint8 * aSrceBuffer
TInt aSrceSize

DoDecompressTwelveBitDataAltL(RReadStream &, TInt, TUint32 *)

voidDoDecompressTwelveBitDataAltL(RReadStream &aStream,
TIntaSrceSizeInBytes,
TUint32 *aBase
)[private]

Parameters

RReadStream & aStream
TInt aSrceSizeInBytes
TUint32 * aBase

DoDecompressTwentyFourBitData(TUint8 *, TInt, TUint8 *, TInt)

voidDoDecompressTwentyFourBitData(TUint8 *aDestBuffer,
TIntaDestSize,
TUint8 *aSrceBuffer,
TIntaSrceSize
)[private]

Parameters

TUint8 * aDestBuffer
TInt aDestSize
TUint8 * aSrceBuffer
TInt aSrceSize

DoDecompressTwentyFourBitDataAltL(RReadStream &, TInt, TUint32 *)

voidDoDecompressTwentyFourBitDataAltL(RReadStream &aStream,
TIntaSrceSizeInBytes,
TUint32 *aBase
)[private]

Parameters

RReadStream & aStream
TInt aSrceSizeInBytes
TUint32 * aBase

DoExternalizeByteDataCompressedL(RWriteStream &, TUint8 *, TInt)

voidDoExternalizeByteDataCompressedL(RWriteStream &aStream,
TUint8 *aData,
TIntaSizeInBytes
)const [private]

Parameters

RWriteStream & aStream
TUint8 * aData
TInt aSizeInBytes

DoExternalizeDataCompressedL(RWriteStream &, TUint8 *, TInt)

voidDoExternalizeDataCompressedL(RWriteStream &aStream,
TUint8 *aData,
TIntaSizeInBytes
)const [private]

Parameters

RWriteStream & aStream
TUint8 * aData
TInt aSizeInBytes

DoExternalizeSixteenBitDataCompressedL(RWriteStream &, TUint8 *, TInt)

voidDoExternalizeSixteenBitDataCompressedL(RWriteStream &aStream,
TUint8 *aData,
TIntaSizeInBytes
)const [private]

Parameters

RWriteStream & aStream
TUint8 * aData
TInt aSizeInBytes

DoExternalizeThirtyTwoABitDataCompressedL(RWriteStream &, TUint8 *, TInt)

voidDoExternalizeThirtyTwoABitDataCompressedL(RWriteStream &aStream,
TUint8 *aData,
TIntaSizeInBytes
)const [private]

The function externalizes 32-bit buffer with alpha channel in top byte to the 32-bit compressed stream by using RLE compression algorithm

Parameters

RWriteStream & aStream
TUint8 * aData
TInt aSizeInBytes

DoExternalizeThirtyTwoUBitDataCompressedL(RWriteStream &, TUint8 *, TInt)

voidDoExternalizeThirtyTwoUBitDataCompressedL(RWriteStream &aStream,
TUint8 *aData,
TIntaSizeInBytes
)const [private]

The function externalizes 32-bit buffer with unused top bytes to the 24-bit compressed stream by using RLE compression algorithm

Parameters

RWriteStream & aStream
TUint8 * aData
TInt aSizeInBytes

DoExternalizeTwelveBitDataCompressedL(RWriteStream &, TUint8 *, TInt)

voidDoExternalizeTwelveBitDataCompressedL(RWriteStream &aStream,
TUint8 *aData,
TIntaSizeInBytes
)const [private]

Parameters

RWriteStream & aStream
TUint8 * aData
TInt aSizeInBytes

DoExternalizeTwentyFourBitDataCompressedL(RWriteStream &, TUint8 *, TInt)

voidDoExternalizeTwentyFourBitDataCompressedL(RWriteStream &aStream,
TUint8 *aData,
TIntaSizeInBytes
)const [private]

Parameters

RWriteStream & aStream
TUint8 * aData
TInt aSizeInBytes

DoGetScanLinePtr(TUint32 *&, TPoint &, TInt, TUint32 *, TLineScanningPosition &)

TInt DoGetScanLinePtr(TUint32 *&aSlptr,
TPoint &aPixel,
TIntaLength,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const [private]

Parameters

TUint32 *& aSlptr
TPoint & aPixel
TInt aLength
TUint32 * aBase
TLineScanningPosition & aLineScanningPosition

DoInternalizeCompressedDataL(RReadStream &, TInt, TUint32 *, TBitmapfileCompression)

voidDoInternalizeCompressedDataL(RReadStream &aStream,
TIntaSrceSize,
TUint32 *aBase,
TBitmapfileCompressionaCompression
)[private]

Parameters

RReadStream & aStream
TInt aSrceSize
TUint32 * aBase
TBitmapfileCompression aCompression

DoInternalizeL(RReadStream &, TInt, TUint32 *)

voidDoInternalizeL(RReadStream &aStream,
TIntaSrceSize,
TUint32 *aBase
)[private]

Parameters

RReadStream & aStream
TInt aSrceSize
TUint32 * aBase

DoStretchScanLine(TDes8 &, TInt, TInt, TInt, TInt, TInt, TInt, TInt, const TPoint &, TDisplayMode, TUint32 *, TLineScanningPosition &)

voidDoStretchScanLine(TDes8 &aBuf,
TIntx,
TInty,
TIntaClipStrchX,
TIntaClipStrchLen,
TIntaStretchLength,
TIntaOrgX,
TIntaOrgLen,
const TPoint &aDitherOffset,
TDisplayModeaDispMode,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const [private]

Parameters

TDes8 & aBuf
TInt x
TInt y
TInt aClipStrchX
TInt aClipStrchLen
TInt aStretchLength
TInt aOrgX
TInt aOrgLen
const TPoint & aDitherOffset
TDisplayMode aDispMode
TUint32 * aBase
TLineScanningPosition & aLineScanningPosition

ExternalizeL(RWriteStream &, const CFbsBitmap &)

IMPORT_C voidExternalizeL(RWriteStream &aStream,
const CFbsBitmap &aHandleBitmap
)const

Parameters

RWriteStream & aStream
const CFbsBitmap & aHandleBitmap

ExternalizeRectangleL(RWriteStream &, const TRect &, const CFbsBitmap &)

IMPORT_C voidExternalizeRectangleL(RWriteStream &aStream,
const TRect &aRect,
const CFbsBitmap &aHandleBitmap
)const

Parameters

RWriteStream & aStream
const TRect & aRect
const CFbsBitmap & aHandleBitmap

Extra()

TExtra *Extra()const [private, inline]

GenerateLineFromCompressed24BitData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)

voidGenerateLineFromCompressed24BitData(TUint8 *aDestBuffer,
const TPoint &aPixel,
TIntaLength,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const [private]

The method generates a line from compressed 24 bpp bitmap data. TScanLineDecompressor

Parameters

TUint8 * aDestBuffer
const TPoint & aPixel
TInt aLength
TUint32 * aBase
TLineScanningPosition & aLineScanningPosition

GenerateLineFromCompressed32ABitData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)

voidGenerateLineFromCompressed32ABitData(TUint8 *aDestBuffer,
const TPoint &aPixel,
TIntaLength,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const [private]

The method generates a line from compressed 32 bpp to 32 bpp bitmap data . TScanLineDecompressor

Parameters

TUint8 * aDestBuffer
const TPoint & aPixel
TInt aLength
TUint32 * aBase
TLineScanningPosition & aLineScanningPosition

GenerateLineFromCompressed32UBitData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)

voidGenerateLineFromCompressed32UBitData(TUint8 *aDestBuffer,
const TPoint &aPixel,
TIntaLength,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const [private]

The method generates a line from compressed 24 bpp to 32 bpp bitmap data . TScanLineDecompressor

Parameters

TUint8 * aDestBuffer
const TPoint & aPixel
TInt aLength
TUint32 * aBase
TLineScanningPosition & aLineScanningPosition

GenerateLineFromCompressedEightBitData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)

voidGenerateLineFromCompressedEightBitData(TUint8 *aDestBuffer,
const TPoint &aPixel,
TIntaLength,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const [private]

Parameters

TUint8 * aDestBuffer
const TPoint & aPixel
TInt aLength
TUint32 * aBase
TLineScanningPosition & aLineScanningPosition

GenerateLineFromCompressedSixteenBitData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)

voidGenerateLineFromCompressedSixteenBitData(TUint8 *aDestBuffer,
const TPoint &aPixel,
TIntaLength,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const [private]

The method generates a line from compressed 16 bpp bitmap data. TScanLineDecompressor

Parameters

TUint8 * aDestBuffer
const TPoint & aPixel
TInt aLength
TUint32 * aBase
TLineScanningPosition & aLineScanningPosition

GenerateLineFromCompressedTwelveBitData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)

voidGenerateLineFromCompressedTwelveBitData(TUint8 *aDestBuffer,
const TPoint &aPixel,
TIntaLength,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const [private]

Parameters

TUint8 * aDestBuffer
const TPoint & aPixel
TInt aLength
TUint32 * aBase
TLineScanningPosition & aLineScanningPosition

GenerateLineFromPaletteCompressedData(TUint8 *, const TPoint &, TInt, TUint32 *, TLineScanningPosition &)

voidGenerateLineFromPaletteCompressedData(TUint8 *aDestBuffer,
const TPoint &aPixel,
TIntaLength,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const [private]

Create a scan line from a palette compressed bitmap. Starting from aPixel in the bitmap pointed to be aBase, populate aDestBuffer with aLength pixels looked up in the palette. Note this function assumes 16, 24 or 32 non alpha bit uncompressed bitmaps, compressed into 8 bit palettes (ie <256 colors) Structure of bitmap is (4 bytes for palette size) + (4 bytes per palette entry) + (1 byte per pixel)

Parameters

TUint8 * aDestBufferPoints to the destination buffer. After the call it will be filled with the decompressed data.
const TPoint & aPixelThe decompression starts from this pixel
TInt aLengthLength of requested decompressed data - in pixels
TUint32 * aBasePoints to the beginning of compressed bitmap data
TLineScanningPosition & aLineScanningPosition

GetGrayPixelEx(TInt, TUint32 *)

TUint8 GetGrayPixelEx(TIntaX,
TUint32 *aScanLineAddress
)const [private]

Parameters

TInt aX
TUint32 * aScanLineAddress

GetLineScanPos(TLineScanningPosition &, const TCompressionBookMark *&, const TUint8 *)

voidGetLineScanPos(TLineScanningPosition &aLineScanPos,
const TCompressionBookMark *&aComprBookMark,
const TUint8 *aBase
)const [private]

If the bitmap is compressed in RAM, the method will find its compresssion bookmark, which is located at the end of the bitmap data and will reinitialize aLineScanPos parameter.

Parameters

TLineScanningPosition & aLineScanPosLine scaning position. It is used by scan line decompression methods.
const TCompressionBookMark *& aComprBookMarkIf the bitmap is compressed in RAM, aComprBookMark will be initialized to point to its compression bookmark data. The compression bookmark data will be used for aLineScanPos initialization.
const TUint8 * aBaseIt points to the beginning of the bitmap data.

GetPixel(TRgb &, const TPoint &, TUint32 *, CFbsRasterizer *)

IMPORT_C voidGetPixel(TRgb &aColor,
const TPoint &aPos,
TUint32 *aBase,
CFbsRasterizer *aRasterizer
)const
The method retrieves the red, green, blue (RGB) color value of the pixel with specified coordinates. Note: The method works for uncompressed bitmaps and extended bitmaps only.
Pre-condition
aBase != NULL;

Parameters

TRgb & aColorIt will be initialized with the pixel color value on success, otherwise aColor value will be left unchanged.
const TPoint & aPosPixel coordinates.
TUint32 * aBaseIt points to the beginning of the bitmap data.
CFbsRasterizer * aRasterizer

GetRgbPixelEx(TInt, TUint32 *)

TRgb GetRgbPixelEx(TIntaX,
TUint32 *aScanLineAddress
)const [private]

Parameters

TInt aX
TUint32 * aScanLineAddress

GetRgbPixelExMany(TInt, TUint32 *, TUint32 *, TInt)

voidGetRgbPixelExMany(TIntaX,
TUint32 *aScanlinePtr,
TUint32 *aDest,
TIntaLength
)const [private]

Parameters

TInt aX
TUint32 * aScanlinePtr
TUint32 * aDest
TInt aLength

GetRgbPixelExMany16M(TInt, TUint32 *, TUint8 *, TInt)

voidGetRgbPixelExMany16M(TIntaX,
TUint32 *aScanlinePtr,
TUint8 *aDest,
TIntaLength
)const [private]

Parameters

TInt aX
TUint32 * aScanlinePtr
TUint8 * aDest
TInt aLength

GetRgbPixelExMany16MAP(TInt, TUint32 *, TUint32 *, TInt)

voidGetRgbPixelExMany16MAP(TIntaX,
TUint32 *aScanlinePtr,
TUint32 *aDest,
TIntaLength
)const [private]

The method retrieves the RGB color values from the scanline, and converts them into the destination screen-mode pixel format. This method handles the special case when the destination mode is EColor16MAP (32bit with alpha values premultiplied with the color channels. Calls GetRgbPixelExMany for values not 32 bit, as there is no alpha information in these color modes. For color mode EColor16MU, no conversion is performed (as alpha is assumed to be 1).

Parameters

TInt aXThe x co-ordinate the scanline data needs to be retrieved from.
TUint32 * aScanlinePtrThe scanline pointer, i.e. the source data.
TUint32 * aDestThe pointer to the destination buffer. This is where the output is stored.
TInt aLengthThe number of bytes to be copied. This value must be a multiple of 4.

GetScanLine(TDes8 &, const TPoint &, TInt, TBool, const TPoint &, TDisplayMode, TUint32 *, TLineScanningPosition &)

IMPORT_C voidGetScanLine(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TBoolaDither,
const TPoint &aDitherOffset,
TDisplayModeaDispMode,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TBool aDither
const TPoint & aDitherOffset
TDisplayMode aDispMode
TUint32 * aBase
TLineScanningPosition & aLineScanningPosition

GetScanLine(TUint32 *&, TDes8 &, const TPoint &, TInt, TBool, const TPoint &, TDisplayMode)

IMPORT_C voidGetScanLine(TUint32 *&aSlptr,
TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TBoolaDither,
const TPoint &aDitherOffset,
TDisplayModeaDispMode
)const

Parameters

TUint32 *& aSlptr
TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TBool aDither
const TPoint & aDitherOffset
TDisplayMode aDispMode

GetScanLine(TDes8 &, const TPoint &, TInt, TBool, const TPoint &, TDisplayMode, TUint32 *)

IMPORT_C voidGetScanLine(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TBoolaDither,
const TPoint &aDitherOffset,
TDisplayModeaDispMode,
TUint32 *aBase
)const

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TBool aDither
const TPoint & aDitherOffset
TDisplayMode aDispMode
TUint32 * aBase

GetScanLineColor16(TDes8 &, const TPoint &, TInt, TUint32 *)

voidGetScanLineColor16(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TUint32 * aScanlinePtr

GetScanLineColor16M(TDes8 &, const TPoint &, TInt, TUint32 *)

voidGetScanLineColor16M(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TUint32 * aScanlinePtr

GetScanLineColor16MA(TDes8 &, const TPoint &, TInt, TUint32 *)

voidGetScanLineColor16MA(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TUint32 * aScanlinePtr

GetScanLineColor16MAP(TDes8 &, const TPoint &, TInt, TUint32 *)

voidGetScanLineColor16MAP(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TUint32 *aScanlinePtr
)const [private]

Get the scanline data into the destination buffer in the EColor16MAP format.

Parameters

TDes8 & aBuf- destination buffer
const TPoint & aPixel- the start position of the scanline.
TInt aLength- scanline length, as word length
TUint32 * aScanlinePtr- scanline pointer

GetScanLineColor16MU(TDes8 &, const TPoint &, TInt, TUint32 *)

voidGetScanLineColor16MU(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TUint32 * aScanlinePtr

GetScanLineColor256(TDes8 &, const TPoint &, TInt, TUint32 *)

voidGetScanLineColor256(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TUint32 * aScanlinePtr

GetScanLineColor4K(TDes8 &, const TPoint &, TInt, TUint32 *)

voidGetScanLineColor4K(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TUint32 * aScanlinePtr

GetScanLineColor64K(TDes8 &, const TPoint &, TInt, TUint32 *)

voidGetScanLineColor64K(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TUint32 * aScanlinePtr

GetScanLineColorRgb(TDes8 &, const TPoint &, TInt, TUint32 *)

voidGetScanLineColorRgb(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TUint32 * aScanlinePtr

GetScanLineExBits(TDes8 &, TInt, TInt, TUint32 *)

voidGetScanLineExBits(TDes8 &aBuf,
TIntaX,
TIntaLength,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
TInt aX
TInt aLength
TUint32 * aScanlinePtr

GetScanLineExBytes(TDes8 &, TInt, TInt, TUint32 *)

voidGetScanLineExBytes(TDes8 &aBuf,
TIntaX,
TIntaLength,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
TInt aX
TInt aLength
TUint32 * aScanlinePtr

GetScanLineGray16(TDes8 &, const TPoint &, TInt, TUint32 *)

voidGetScanLineGray16(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TUint32 * aScanlinePtr

GetScanLineGray2(TDes8 &, const TPoint &, TInt, TBool, const TPoint &, TUint32 *)

voidGetScanLineGray2(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TBoolaDither,
const TPoint &aDitherOffset,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TBool aDither
const TPoint & aDitherOffset
TUint32 * aScanlinePtr

GetScanLineGray256(TDes8 &, const TPoint &, TInt, TUint32 *)

voidGetScanLineGray256(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TUint32 * aScanlinePtr

GetScanLineGray4(TDes8 &, const TPoint &, TInt, TBool, const TPoint &, TUint32 *)

voidGetScanLineGray4(TDes8 &aBuf,
const TPoint &aPixel,
TIntaLength,
TBoolaDither,
const TPoint &aDitherOffset,
TUint32 *aScanlinePtr
)const [private]

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aLength
TBool aDither
const TPoint & aDitherOffset
TUint32 * aScanlinePtr

GetScanLinePtr(TUint32 *&, TPoint &, TInt, TUint32 *, TLineScanningPosition &)

IMPORT_C TIntGetScanLinePtr(TUint32 *&aSlptr,
TPoint &aPixel,
TIntaLength,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const

Parameters

TUint32 *& aSlptr
TPoint & aPixel
TInt aLength
TUint32 * aBase
TLineScanningPosition & aLineScanningPosition

GetScanLinePtr(TUint32 *&, TInt &, TPoint &, TUint32 *, TLineScanningPosition &)

IMPORT_C TIntGetScanLinePtr(TUint32 *&aSlptr,
TInt &aLength,
TPoint &aPixel,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const

Parameters

TUint32 *& aSlptr
TInt & aLength
TPoint & aPixel
TUint32 * aBase
TLineScanningPosition & aLineScanningPosition

GetVerticalScanLine(TDes8 &, TInt, TBool, const TPoint &, TDisplayMode, TUint32 *, CFbsRasterizer *)

IMPORT_C voidGetVerticalScanLine(TDes8 &aBuf,
TIntaX,
TBoolaDither,
const TPoint &aDitherOffset,
TDisplayModeaDispMode,
TUint32 *aBase,
CFbsRasterizer *aRasterizer
)const

Gets the bitmap s vertical scanline starting at the specified x co-ordinate and using the specified dither offset. Note: The method works for uncompressed bitmaps only.

Parameters

TDes8 & aBufThe buffer in which the vertical scanline will be returned.
TInt aXThe x co-ordinate of the vertical scanline to get.
TBool aDither
const TPoint & aDitherOffsetThe dither offset of the bitmap.
TDisplayMode aDispModeFormat to be used to write the data to the buffer.
TUint32 * aBaseThe bitmap's data start address.
CFbsRasterizer * aRasterizer

HardwareBitmapHandle()

IMPORT_C TIntHardwareBitmapHandle()const

HashTo1bpp(TUint32, TBool, TBool)

TUint32 HashTo1bpp(TUint32aGray256,
TBoolaOddX,
TBoolaOddY
)const [private]

Parameters

TUint32 aGray256
TBool aOddX
TBool aOddY

HashTo2bpp(TUint32, TInt)

TUint32 HashTo2bpp(TUint32aGray256,
TIntaDitherIndex
)const [private]

Parameters

TUint32 aGray256
TInt aDitherIndex

Header()

IMPORT_C SEpocBitmapHeaderHeader()const

The header is exposed by CFbsBitmap so this doesn't break encapsulation. Specifically added to allow CBitmapObject to see compression information.

HorizontalPixelsToTwips(TInt)

IMPORT_C TIntHorizontalPixelsToTwips(TIntaPixels)const

Parameters

TInt aPixels

HorizontalTwipsToPixels(TInt)

IMPORT_C TIntHorizontalTwipsToPixels(TIntaTwips)const

Parameters

TInt aTwips

InitialDisplayMode()

TDisplayMode InitialDisplayMode()const [private]

InternalizeHeaderL(RReadStream &, SEpocBitmapHeader &)

IMPORT_C voidInternalizeHeaderL(RReadStream &aStream,
SEpocBitmapHeader &aHeader
)[static]

Parameters

RReadStream & aStream
SEpocBitmapHeader & aHeader

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)

Internalizes the bit map contents from a stream.

Parameters

RReadStream & aStreamThe read stream containing the bit map.

IsColor(TDisplayMode)

TInt IsColor(TDisplayModeaDispMode)[private, static]

Parameters

TDisplayMode aDispMode

IsCompressed()

IMPORT_C TBoolIsCompressed()const

Check for a bitmap if it is compressed in some manner.

IsCompressedInRAM()

IMPORT_C TBoolIsCompressedInRAM()const

IsLargeBitmap()

IMPORT_C TBoolIsLargeBitmap()const

IsMonochrome(TUint32 *)

IMPORT_C TBoolIsMonochrome(TUint32 *aBase)const

Tests whether or not the bitmap is monochrome. Monochrome bitmaps have a display-mode of 1 bit-per-pixel. Note: The method works for uncompressed bitmaps only.

Parameters

TUint32 * aBaseBitmap's data base address

IsWordMonochrome(TUint32)

TBool IsWordMonochrome(TUint32aWord)const [private]

Parameters

TUint32 aWord

PaletteAssign16BitColor(TUint8 *&, TUint32)

voidPaletteAssign16BitColor(TUint8 *&aDestPtr,
TUint32aColor
)[private, static]

Specialised function for assigning pixels into an uncompressed scanline of 16 bit color depth. Implemented for speed, not size

Parameters

TUint8 *& aDestPtrAddress to write uncompressed data to. Will be incremented on return from function.
TUint32 aColorColor info to write.

PaletteAssign24BitColor(TUint8 *&, TUint32)

voidPaletteAssign24BitColor(TUint8 *&aDestPtr,
TUint32aColor
)[private, static]

Specialised function for assigning pixels into an uncompressed scanline of 24 bit color depth. Implemented for speed, not size

Parameters

TUint8 *& aDestPtrAddress to write uncompressed data to. Will be incremented on return from function.
TUint32 aColorColor info to write.

PaletteAssign32BitColor(TUint8 *&, TUint32)

voidPaletteAssign32BitColor(TUint8 *&aDestPtr,
TUint32aColor
)[private, static]

Specialised function for assigning pixels into an uncompressed scanline of 32 bit color depth. Implemented for speed, not size

Parameters

TUint8 *& aDestPtrAddress to write uncompressed data to. Will be incremented on return from function.
TUint32 aColorColor info to write.

PaletteBitsPerPixel(TInt)

TUint PaletteBitsPerPixel(TIntaNumColors)const [private]

Get the bits used per pixel when packing multiple pixels in palette compression. The value returned is a power of 2, not always the most efficient pack, for alignment reasons, Eg 65537 -> KMaxTInt : 32 bpp 257 -> 65536 colors : 16 bpp 17 -> 256 colors : 8 bpp 5 -> 16 colors : 4 bpp 3 -> 4 colors : 2 bpp 0 -> 2 colors : 1 bpp

Parameters

TInt aNumColorsThe number of colors in the bitmap. This governs the size of the palette and thus the number of bits needed to represent an index into it.

PaletteBytesPerPixel(TInt)

TUint PaletteBytesPerPixel(TIntaBitsPerPixel)const [private]

Gets the bytes used per pixel according to the bits per pixel of a bitmap. Also used to find which bit per pixel values are supported by palette compression, hence this is not a case of simple division by 8. If return value is zero, the supplied bit per pixel value is not supported by palette compression.

Parameters

TInt aBitsPerPixelThe bits per pixel value to transform into bytes

PaletteCompress()

TInt PaletteCompress()[private]
Attempts to compress a bitmap by reducing it to a palette + data. If the compression fails, for any of the reasons detailed below, RLE compression will be attempted instead. Prerequisites:
  • Bitmap must not already be compressed.

  • Bitmap must contain no more than 255 colors - If bitmap contains >255 colors then palette compression is unlikely to be effective.

  • Bitmap must be 16, 24 or 32 (non alpha) bpp. Other modes could be implemented, but smaller bit depths will yield less compression Small bitmaps (under 1000 pixels) will be unlikely to compress well if at all Structure of compressed bitmap will be as follows; size of palette[4 bytes] | palette[size * 4 bytes per entry] | data[pixels * upto 1 byte per pixel] Bitmap data is packed into memory as efficiently as possible, according to the number of bits required. Each line of the compressed bitmap will start on a byte boundary, but not necessarily on a word boundary.

PaletteDecode1PixelPerByte(TUint8 *, TUint32 *, TUint8 *&, TAssignFunction)

voidPaletteDecode1PixelPerByte(TUint8 *aDataPtr,
TUint32 *aPalettePtr,
TUint8 *&aDestPtr,
TAssignFunctionaAssignFunction
)[private, static]

Specialised function for decoding pixels from a palette compressed bitmap with 1 pixel packed in each byte. Implemented for speed, not size

Parameters

TUint8 * aDataPtrAddress in compressed data to read from
TUint32 * aPalettePtrAddress of the start of the palette in the compressed data
TUint8 *& aDestPtrAddress to write uncompressed data to. Will be incremented on return from function.
TAssignFunction aAssignFunctionFunction pointer to assigment function to use to write actual pixel data to uncompressed scanline

PaletteDecode2PixelPerByte(TUint8 *, TUint32 *, TUint8 *&, TAssignFunction)

voidPaletteDecode2PixelPerByte(TUint8 *aDataPtr,
TUint32 *aPalettePtr,
TUint8 *&aDestPtr,
TAssignFunctionaAssignFunction
)[private, static]

Specialised function for decoding pixels from a palette compressed bitmap with 2 pixels packed in each byte. Implemented for speed, not size

Parameters

TUint8 * aDataPtrAddress in compressed data to read from
TUint32 * aPalettePtrAddress of the start of the palette in the compressed data
TUint8 *& aDestPtrAddress to write uncompressed data to. Will be incremented on return from function.
TAssignFunction aAssignFunctionFunction pointer to assigment function to use to write actual pixel data to uncompressed scanline

PaletteDecode4PixelPerByte(TUint8 *, TUint32 *, TUint8 *&, TAssignFunction)

voidPaletteDecode4PixelPerByte(TUint8 *aDataPtr,
TUint32 *aPalettePtr,
TUint8 *&aDestPtr,
TAssignFunctionaAssignFunction
)[private, static]

Specialised function for decoding pixels from a palette compressed bitmap with 4 pixels packed in each byte. Implemented for speed, not size

Parameters

TUint8 * aDataPtrAddress in compressed data to read from
TUint32 * aPalettePtrAddress of the start of the palette in the compressed data
TUint8 *& aDestPtrAddress to write uncompressed data to. Will be incremented on return from function.
TAssignFunction aAssignFunctionFunction pointer to assigment function to use to write actual pixel data to uncompressed scanline

PaletteDecode8PixelPerByte(TUint8 *, TUint32 *, TUint8 *&, TAssignFunction)

voidPaletteDecode8PixelPerByte(TUint8 *aDataPtr,
TUint32 *aPalettePtr,
TUint8 *&aDestPtr,
TAssignFunctionaAssignFunction
)[private, static]

Specialised function for decoding pixels from a palette compressed bitmap with 8 pixels packed in each byte. Implemented for speed, not size

Parameters

TUint8 * aDataPtrAddress in compressed data to read from
TUint32 * aPalettePtrAddress of the start of the palette in the compressed data
TUint8 *& aDestPtrAddress to write uncompressed data to. Will be incremented on return from function.
TAssignFunction aAssignFunctionFunction pointer to assigment function to use to write actual pixel data to uncompressed scanline

PaletteDecodeAndAssignGeneric(TUint8 *, TUint32 *, TUint8 *&, TUint, TUint, TUint, TUint)

voidPaletteDecodeAndAssignGeneric(TUint8 *aDataPtr,
TUint32 *aPalettePtr,
TUint8 *&aDestPtr,
TUintaStartPixel,
TUintaEndPixel,
TUintaCompressedPixelsPerByte,
TUintaCompressedBitsPerPixel
)const [private]

This function deals with all different bit depths & color counts dynamically - smaller but slower

Parameters

TUint8 * aDataPtrAddress in compressed data to read from
TUint32 * aPalettePtrAddress of the start of the palette in the compressed data
TUint8 *& aDestPtrAddress to write uncompressed data to. Will be incremented on return from function.
TUint aStartPixelZero based position within the compressed byte of the first pixel to decompress
TUint aEndPixelZero based position within the compressed byte of the last pixel to decompress
TUint aCompressedPixelsPerByteNumber of pixels packed into each byte of the compressed data
TUint aCompressedBitsPerPixelNumber of bits used to express each pixel in the compressed data. Nothing to do with the color depth of the image.

Reset()

IMPORT_C voidReset()[private]

ScanLineAddress(TUint32 *, TUint)

IMPORT_C TUint32 *ScanLineAddress(TUint32 *aBase,
TUintaY
)const

Parameters

TUint32 * aBase
TUint aY

SetCompressionBookmark(TLineScanningPosition &, TUint32 *, const CFbsBitmap *)

IMPORT_C voidSetCompressionBookmark(TLineScanningPosition &aLineScanningPosition,
TUint32 *aBase,
const CFbsBitmap *aFbsBitmap
)

Parameters

TLineScanningPosition & aLineScanningPosition
TUint32 * aBase
const CFbsBitmap * aFbsBitmap

SetDisplayMode(TDisplayMode, TUint32 *)

TInt SetDisplayMode(TDisplayModeaDisplayMode,
TUint32 *aDataAddress
)[private]

The method changes current display mode of the bitmap. Requested display mode can't be greater (bpp value) than the initial display mode. CBitwiseBitmap instances are shared between the client and server side and SetDisplayMode() can be called only from the client side, because its functionality depends on the RFbsSession instance. The method can't leave because of out of memory condition or something else - no additional memory is allocated or "L" methods called. The bitmap content is preserved when converting it to the requested display mode, but there may be some loss of a quality.

Parameters

TDisplayMode aDisplayModeRequested display mode.
TUint32 * aDataAddressBitmap data address.

SizeInPixels()

IMPORT_C TSizeSizeInPixels()const

SizeInTwips()

IMPORT_C TSizeSizeInTwips()const

SizeOfByteDataCompressed(TUint8 *, TInt)

TInt SizeOfByteDataCompressed(TUint8 *aData,
TIntaSizeInBytes
)const [private]

Parameters

TUint8 * aData
TInt aSizeInBytes

SizeOfDataCompressed(TUint8 *, TInt)

TInt SizeOfDataCompressed(TUint8 *aData,
TIntaSizeInBytes
)const [private]

Parameters

TUint8 * aData
TInt aSizeInBytes

SizeOfSixteenBitDataCompressed(TUint8 *, TInt)

TInt SizeOfSixteenBitDataCompressed(TUint8 *aData,
TIntaSizeInBytes
)const [private]

Parameters

TUint8 * aData
TInt aSizeInBytes

SizeOfThirtyTwoABitDataCompressed(TUint8 *, TInt)

TInt SizeOfThirtyTwoABitDataCompressed(TUint8 *aData,
TIntaSizeInBytes
)const [private]

This function calculates the size of 32-bit RLE compression stream which is obtained from a given 32-bit buffer, where the top 8 bits are used to represent the alpha channel

Parameters

TUint8 * aData
TInt aSizeInBytes

SizeOfThirtyTwoUBitDataCompressed(TUint8 *, TInt)

TInt SizeOfThirtyTwoUBitDataCompressed(TUint8 *aData,
TIntaSizeInBytes
)const [private]

The function calculates the size of 24-bit RLE compression stream which could be obtain from given 32-bit buffer, where the top bytes are unused

Parameters

TUint8 * aData
TInt aSizeInBytes

SizeOfTwelveBitDataCompressed(TUint8 *, TInt)

TInt SizeOfTwelveBitDataCompressed(TUint8 *aData,
TIntaSizeInBytes
)const [private]

Parameters

TUint8 * aData
TInt aSizeInBytes

SizeOfTwentyFourBitDataCompressed(TUint8 *, TInt)

TInt SizeOfTwentyFourBitDataCompressed(TUint8 *aData,
TIntaSizeInBytes
)const [private]

Parameters

TUint8 * aData
TInt aSizeInBytes

StretchScanLine(TDes8 &, const TPoint &, TInt, TInt, TInt, TInt, TInt, const TPoint &, TDisplayMode, TUint32 *)

IMPORT_C voidStretchScanLine(TDes8 &aBuf,
const TPoint &aPixel,
TIntaClipStrchX,
TIntaClipStrchLen,
TIntaStretchLength,
TIntaOrgX,
TIntaOrgLen,
const TPoint &aDitherOffset,
TDisplayModeaDispMode,
TUint32 *aBase
)const

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aClipStrchX
TInt aClipStrchLen
TInt aStretchLength
TInt aOrgX
TInt aOrgLen
const TPoint & aDitherOffset
TDisplayMode aDispMode
TUint32 * aBase

StretchScanLine(TDes8 &, const TPoint &, TInt, TInt, TInt, TInt, TInt, const TPoint &, TDisplayMode, TUint32 *, TLineScanningPosition &)

IMPORT_C voidStretchScanLine(TDes8 &aBuf,
const TPoint &aPixel,
TIntaClipStrchX,
TIntaClipStrchLen,
TIntaStretchLength,
TIntaOrgX,
TIntaOrgLen,
const TPoint &aDitherOffset,
TDisplayModeaDispMode,
TUint32 *aBase,
TLineScanningPosition &aLineScanningPosition
)const

Parameters

TDes8 & aBuf
const TPoint & aPixel
TInt aClipStrchX
TInt aClipStrchLen
TInt aStretchLength
TInt aOrgX
TInt aOrgLen
const TPoint & aDitherOffset
TDisplayMode aDispMode
TUint32 * aBase
TLineScanningPosition & aLineScanningPosition

SwapWidthAndHeight(TUint32 *)

TInt SwapWidthAndHeight(TUint32 *aDataAddress)[private]

The method swaps the bitmap width and height. For example: if the bitmap size is (40, 20), the new bitmap size will be (20, 40). Bitmap content is not preserved.

Parameters

TUint32 * aDataAddressBitmap data address.

TrueColorPointerCompare(TUint8 *, TUint8, TUint8, TUint8)

TBool TrueColorPointerCompare(TUint8 *aColorPointer,
TUint8aComponent1,
TUint8aComponent2,
TUint8aComponent3
)const [private]

Parameters

TUint8 * aColorPointer
TUint8 aComponent1
TUint8 aComponent2
TUint8 aComponent3

Uid()

IMPORT_C TUidUid()const

UpdateBitmapProperties(TDisplayMode)

voidUpdateBitmapProperties(TDisplayModeaNewDisplayMode)[private]

The method updates CBitwiseBitmap data members regarding to the new display mode. Note: The method must be called only from CBitwiseBitmap::SetDisplayMode method. CBitwiseBitmap::SetDisplayMode.

Parameters

TDisplayMode aNewDisplayModeThe new display mode.

UpdateBookMark(const TLineScanningPosition &, TCompressionBookMark *, const TUint8 *)

voidUpdateBookMark(const TLineScanningPosition &aLineScanPos,
TCompressionBookMark *aComprBookMark,
const TUint8 *aBase
)const [private]

If the bitmap is compressed in RAM, the method will update its compresssion bookmark data, which is located at the end of the bitmap data.

Parameters

const TLineScanningPosition & aLineScanPosLine scaning position.
TCompressionBookMark * aComprBookMarkIf the bitmap is compressed in RAM, aComprBookMark points to its compression bookmark data.
const TUint8 * aBaseIt points to the beginning of the bitmap data.

UpdatePaddingData(TUint32 *)

voidUpdatePaddingData(TUint32 *aData)[private]

Optimises the bitmap data for Run Length Encoding by changing unused pixel data. This function calculates number of padding pixels per scanline and replaces their color with the color of the scanline's final pixel.

Parameters

TUint32 * aData

VerticalPixelsToTwips(TInt)

IMPORT_C TIntVerticalPixelsToTwips(TIntaPixels)const

Parameters

TInt aPixels

VerticalTwipsToPixels(TInt)

IMPORT_C TIntVerticalTwipsToPixels(TIntaTwips)const

Parameters

TInt aTwips

WhiteFill(TUint8 *, TInt, TDisplayMode)

voidWhiteFill(TUint8 *aData,
TIntaDataSize,
TDisplayModeaDispMode
)[private, static]

Parameters

TUint8 * aData
TInt aDataSize
TDisplayMode aDispMode

operator delete(TAny *)

IMPORT_C voidoperator delete(TAny *)[private]

Parameters

TAny *

operator delete(TAny *, TAny *)

voidoperator delete(TAny *,
TAny *
)[private, inline]

Parameters

TAny *
TAny *

Member Data Documentation

TInt iByteWidth

TInt iByteWidth[private]

TInt iDataOffset

TInt iDataOffset[private]

SEpocBitmapHeader iHeader

SEpocBitmapHeader iHeader[private]

RHeap * iHeap

RHeap *iHeap[private]

TBool iIsCompressedInRAM

TBool iIsCompressedInRAM[private]

CChunkPile * iPile

CChunkPile *iPile[private]

struct CBitwiseBitmap::TSettings iSettings

struct CBitwiseBitmap::TSettingsiSettings[private]

TInt iSpare

TInt iSpare[private]

TUid iUid

TUid iUid[private]