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 TInt CheckBackgroundCompressData ()
IMPORT_C TInt CompressData ()
IMPORT_C TInt CompressData ( TBitmapfileCompressionScheme )
IMPORT_C TInt DataStride ()
IMPORT_C TDisplayMode DisplayMode ()
IMPORT_C void ExternalizeL ( RWriteStream &, const CFbsBitmap &)
IMPORT_C void ExternalizeRectangleL ( RWriteStream &, const TRect &, const CFbsBitmap &)
IMPORT_C void GetPixel ( TRgb &, const TPoint &, TUint32 *, CFbsRasterizer *)
IMPORT_C void GetScanLine ( TDes8 &, const TPoint &, TInt , TBool , const TPoint &, TDisplayMode , TUint32 *, TLineScanningPosition &)
IMPORT_C void GetScanLine ( TUint32 *&, TDes8 &, const TPoint &, TInt , TBool , const TPoint &, TDisplayMode )
IMPORT_C void GetScanLine ( TDes8 &, const TPoint &, TInt , TBool , const TPoint &, TDisplayMode , TUint32 *)
IMPORT_C TInt GetScanLinePtr ( TUint32 *&, TPoint &, TInt , TUint32 *, TLineScanningPosition &)
IMPORT_C TInt GetScanLinePtr ( TUint32 *&, TInt &, TPoint &, TUint32 *, TLineScanningPosition &)
IMPORT_C void GetVerticalScanLine ( TDes8 &, TInt , TBool , const TPoint &, TDisplayMode , TUint32 *, CFbsRasterizer *)
IMPORT_C TInt HardwareBitmapHandle ()
IMPORT_C SEpocBitmapHeader Header ()
IMPORT_C TInt HorizontalPixelsToTwips ( TInt )
IMPORT_C TInt HorizontalTwipsToPixels ( TInt )
IMPORT_C void InternalizeHeaderL ( RReadStream &, SEpocBitmapHeader &)
IMPORT_C void InternalizeL ( RReadStream &)
IMPORT_C TBool IsCompressed ()
IMPORT_C TBool IsCompressedInRAM ()
IMPORT_C TBool IsLargeBitmap ()
IMPORT_C TBool IsMonochrome ( TUint32 *)
IMPORT_C TUint32 * ScanLineAddress ( TUint32 *, TUint )
IMPORT_C void SetCompressionBookmark ( TLineScanningPosition &, TUint32 *, const CFbsBitmap *)
IMPORT_C TSize SizeInPixels ()
IMPORT_C TSize SizeInTwips ()
IMPORT_C void StretchScanLine ( TDes8 &, const TPoint &, TInt , TInt , TInt , TInt , TInt , const TPoint &, TDisplayMode , TUint32 *)
IMPORT_C void StretchScanLine ( TDes8 &, const TPoint &, TInt , TInt , TInt , TInt , TInt , const TPoint &, TDisplayMode , TUint32 *, TLineScanningPosition &)
IMPORT_C TUid Uid ()
IMPORT_C TInt VerticalPixelsToTwips ( TInt )
IMPORT_C TInt VerticalTwipsToPixels ( TInt )
Private Member Functions
CBitwiseBitmap ( RHeap *, CChunkPile *)
~CBitwiseBitmap ()
void AdjustXCoord ( TInt &)
void BitmapFill16 ( TUint16 *, TInt , TUint16 )
void BitmapFill32 ( TUint32 *, TInt , TUint32 )
TInt Bpp ( TDisplayMode )
TInt ByteWidth ( TInt , TDisplayMode )
void ChangeDisplayMode ( TDisplayMode , TInt , TUint8 *, TUint32 *, TInt , TInt , TInt )
void CheckHeaderIsValidL (const SEpocBitmapHeader &)
TBool ColorAlphaPointerCompare ( TUint8 *, TUint8 , TUint8 , TUint8 , TUint8 )
TInt CompressedFormatInfo ( TDisplayMode , TInt &, TInt &)
TBitmapfileCompression CompressionType ( TInt , TInt )
IMPORT_C TInt Construct (const TSize &, TDisplayMode , TUid )
IMPORT_C TInt ConstructExtended (const TSize &, TDisplayMode , TUid , TInt )
IMPORT_C void ConstructL ( RFs &, const TDesC &, TInt32 , TUint )
IMPORT_C void ConstructL ( RFile &, TInt32 , TUint )
IMPORT_C void ConstructL ( CShiftedFileStore *, TStreamId )
IMPORT_C TInt CopyData (const CBitwiseBitmap &)
TUint32 * DataAddress ()
TDisplayMode DisplayMode ( TInt , TInt )
TInt DisplayModeArgCheck ( TDisplayMode , TUint32 *)
void DoCompressScanLine ( TDes8 &, TInt , TInt , TInt , TInt , TInt , TInt , TInt , const TPoint &, TDisplayMode , TUint32 *, TLineScanningPosition &)
void DoDecompressByteData ( TUint8 *, TInt , TUint8 *, TInt )
void DoDecompressByteDataAltL ( RReadStream &, TInt , TUint32 *)
void DoDecompressSixteenBitData ( TUint8 *, TInt , TUint8 *, TInt )
void DoDecompressSixteenBitDataAltL ( RReadStream &, TInt , TUint32 *)
void DoDecompressThirtyTwoABitData ( TUint8 *, TInt , TUint8 *, TInt )
void DoDecompressThirtyTwoABitDataAltL ( RReadStream &, TInt , TUint32 *)
void DoDecompressThirtyTwoUBitData ( TUint8 *, TInt , TUint8 *, TInt )
void DoDecompressThirtyTwoUBitDataAltL ( RReadStream &, TInt , TUint32 *)
void DoDecompressTwelveBitData ( TUint8 *, TInt , TUint8 *, TInt )
void DoDecompressTwelveBitDataAltL ( RReadStream &, TInt , TUint32 *)
void DoDecompressTwentyFourBitData ( TUint8 *, TInt , TUint8 *, TInt )
void DoDecompressTwentyFourBitDataAltL ( RReadStream &, TInt , TUint32 *)
void DoExternalizeByteDataCompressedL ( RWriteStream &, TUint8 *, TInt )
void DoExternalizeDataCompressedL ( RWriteStream &, TUint8 *, TInt )
void DoExternalizeSixteenBitDataCompressedL ( RWriteStream &, TUint8 *, TInt )
void DoExternalizeThirtyTwoABitDataCompressedL ( RWriteStream &, TUint8 *, TInt )
void DoExternalizeThirtyTwoUBitDataCompressedL ( RWriteStream &, TUint8 *, TInt )
void DoExternalizeTwelveBitDataCompressedL ( RWriteStream &, TUint8 *, TInt )
void DoExternalizeTwentyFourBitDataCompressedL ( RWriteStream &, TUint8 *, TInt )
TInt DoGetScanLinePtr ( TUint32 *&, TPoint &, TInt , TUint32 *, TLineScanningPosition &)
void DoInternalizeCompressedDataL ( RReadStream &, TInt , TUint32 *, TBitmapfileCompression )
void DoInternalizeL ( RReadStream &, TInt , TUint32 *)
void DoStretchScanLine ( TDes8 &, TInt , TInt , TInt , TInt , TInt , TInt , TInt , const TPoint &, TDisplayMode , TUint32 *, TLineScanningPosition &)
TExtra * Extra ()
void GenerateLineFromCompressed24BitData ( TUint8 *, const TPoint &, TInt , TUint32 *, TLineScanningPosition &)
void GenerateLineFromCompressed32ABitData ( TUint8 *, const TPoint &, TInt , TUint32 *, TLineScanningPosition &)
void GenerateLineFromCompressed32UBitData ( TUint8 *, const TPoint &, TInt , TUint32 *, TLineScanningPosition &)
void GenerateLineFromCompressedEightBitData ( TUint8 *, const TPoint &, TInt , TUint32 *, TLineScanningPosition &)
void GenerateLineFromCompressedSixteenBitData ( TUint8 *, const TPoint &, TInt , TUint32 *, TLineScanningPosition &)
void GenerateLineFromCompressedTwelveBitData ( TUint8 *, const TPoint &, TInt , TUint32 *, TLineScanningPosition &)
void GenerateLineFromPaletteCompressedData ( TUint8 *, const TPoint &, TInt , TUint32 *, TLineScanningPosition &)
TUint8 GetGrayPixelEx ( TInt , TUint32 *)
void GetLineScanPos ( TLineScanningPosition &, const TCompressionBookMark *&, const TUint8 *)
TRgb GetRgbPixelEx ( TInt , TUint32 *)
void GetRgbPixelExMany ( TInt , TUint32 *, TUint32 *, TInt )
void GetRgbPixelExMany16M ( TInt , TUint32 *, TUint8 *, TInt )
void GetRgbPixelExMany16MAP ( TInt , TUint32 *, TUint32 *, TInt )
void GetScanLineColor16 ( TDes8 &, const TPoint &, TInt , TUint32 *)
void GetScanLineColor16M ( TDes8 &, const TPoint &, TInt , TUint32 *)
void GetScanLineColor16MA ( TDes8 &, const TPoint &, TInt , TUint32 *)
void GetScanLineColor16MAP ( TDes8 &, const TPoint &, TInt , TUint32 *)
void GetScanLineColor16MU ( TDes8 &, const TPoint &, TInt , TUint32 *)
void GetScanLineColor256 ( TDes8 &, const TPoint &, TInt , TUint32 *)
void GetScanLineColor4K ( TDes8 &, const TPoint &, TInt , TUint32 *)
void GetScanLineColor64K ( TDes8 &, const TPoint &, TInt , TUint32 *)
void GetScanLineColorRgb ( TDes8 &, const TPoint &, TInt , TUint32 *)
void GetScanLineExBits ( TDes8 &, TInt , TInt , TUint32 *)
void GetScanLineExBytes ( TDes8 &, TInt , TInt , TUint32 *)
void GetScanLineGray16 ( TDes8 &, const TPoint &, TInt , TUint32 *)
void GetScanLineGray2 ( TDes8 &, const TPoint &, TInt , TBool , const TPoint &, TUint32 *)
void GetScanLineGray256 ( TDes8 &, const TPoint &, TInt , TUint32 *)
void GetScanLineGray4 ( 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 )
void PaletteAssign16BitColor ( TUint8 *&, TUint32 )
void PaletteAssign24BitColor ( TUint8 *&, TUint32 )
void PaletteAssign32BitColor ( TUint8 *&, TUint32 )
TUint PaletteBitsPerPixel ( TInt )
TUint PaletteBytesPerPixel ( TInt )
TInt PaletteCompress ()
void PaletteDecode1PixelPerByte ( TUint8 *, TUint32 *, TUint8 *&, TAssignFunction )
void PaletteDecode2PixelPerByte ( TUint8 *, TUint32 *, TUint8 *&, TAssignFunction )
void PaletteDecode4PixelPerByte ( TUint8 *, TUint32 *, TUint8 *&, TAssignFunction )
void PaletteDecode8PixelPerByte ( TUint8 *, TUint32 *, TUint8 *&, TAssignFunction )
void PaletteDecodeAndAssignGeneric ( TUint8 *, TUint32 *, TUint8 *&, TUint , TUint , TUint , TUint )
IMPORT_C void Reset ()
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 )
void UpdateBitmapProperties ( TDisplayMode )
void UpdateBookMark (const TLineScanningPosition &, TCompressionBookMark *, const TUint8 *)
void UpdatePaddingData ( TUint32 *)
void WhiteFill ( TUint8 *, TInt , TDisplayMode )
IMPORT_C void operator delete ( TAny *)
void operator delete ( TAny *, TAny *)
Private Attributes
TInt iByteWidth
TInt iDataOffset
SEpocBitmapHeader iHeader
RHeap * iHeap
TBool iIsCompressedInRAM
CChunkPile * iPile
struct CBitwiseBitmap::TSettings iSettings
TInt iSpare
TUid iUid

Constructor & Destructor Documentation

CBitwiseBitmap(RHeap *, CChunkPile *)

IMPORT_C CBitwiseBitmap ( RHeap * aHeap,
CChunkPile * aPile
) [private]

Parameters

RHeap * aHeap
CChunkPile * aPile

~CBitwiseBitmap()

IMPORT_C ~CBitwiseBitmap ( ) [private]

Member Functions Documentation

AdjustXCoord(TInt &)

void AdjustXCoord ( 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)

void BitmapFill16 ( TUint16 * aDestPtr16,
TInt aCount,
TUint16 aValue16
) [private, static, inline]

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

Parameters

TUint16 * aDestPtr16 pointer to 16bit destination buffer.
TInt aCount Number of 16bit pixels to be copied.
TUint16 aValue16 16bit pixel data.

BitmapFill32(TUint32 *, TInt, TUint32)

void BitmapFill32 ( TUint32 * aDestPtr32,
TInt aCount,
TUint32 aValue32
) [private, static]

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

Parameters

TUint32 * aDestPtr32 pointer to 32bit destination buffer.
TInt aCount Number of 32bit pixels to be copied.
TUint32 aValue32 32bit pixel data.

Bpp(TDisplayMode)

TInt Bpp ( TDisplayMode aDispMode ) [private, static]

Parameters

TDisplayMode aDispMode

ByteWidth(TInt, TDisplayMode)

TInt ByteWidth ( TInt aPixelWidth,
TDisplayMode aDispMode
) [private, static]

Parameters

TInt aPixelWidth
TDisplayMode aDispMode

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

void ChangeDisplayMode ( TDisplayMode aNewDisplayMode,
TInt aScanLineWidthNew,
TUint8 * aDataAddrNew,
TUint32 * aDataAddress,
TInt aYStart,
TInt aYInc,
TInt aYEnd
) [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 aNewDisplayMode Requested display mode.
TInt aScanLineWidthNew Scan 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 * aDataAddrNew New bitmap data - Points to the place where the copying has to start to.
TUint32 * aDataAddress Bitmap data address.
TInt aYStart First scan line number.
TInt aYInc Scan line increment value.
TInt aYEnd Last scan line number.

CheckBackgroundCompressData()

IMPORT_C TInt CheckBackgroundCompressData ( )

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

CheckHeaderIsValidL(const SEpocBitmapHeader &)

void CheckHeaderIsValidL ( const SEpocBitmapHeader & aHeader ) [private, static]

Parameters

const SEpocBitmapHeader & aHeader

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

TBool ColorAlphaPointerCompare ( TUint8 * aColorPointer,
TUint8 aComponent1,
TUint8 aComponent2,
TUint8 aComponent3,
TUint8 aComponent4
) const [private]

Parameters

TUint8 * aColorPointer
TUint8 aComponent1
TUint8 aComponent2
TUint8 aComponent3
TUint8 aComponent4

CompressData()

IMPORT_C TInt CompressData ( )

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 TInt CompressData ( TBitmapfileCompressionScheme aScheme )

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 aScheme The type of bitmap file compression.

CompressedFormatInfo(TDisplayMode, TInt &, TInt &)

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

Parameters

TDisplayMode aDispMode
TInt & aBytesPerPack
TInt & aBytesPerCompressed

CompressionType(TInt, TInt)

TBitmapfileCompression CompressionType ( TInt aBpp,
TInt aColor
) [private, static]

Parameters

TInt aBpp
TInt aColor

Construct(const TSize &, TDisplayMode, TUid)

IMPORT_C TInt Construct ( const TSize & aSize,
TDisplayMode aDispMode,
TUid aCreatorUid
) [private]

Parameters

const TSize & aSize
TDisplayMode aDispMode
TUid aCreatorUid

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

IMPORT_C TInt ConstructExtended ( const TSize & aSize,
TDisplayMode aDispMode,
TUid aType,
TInt aDataSize
) [private]

Parameters

const TSize & aSize
TDisplayMode aDispMode
TUid aType
TInt aDataSize

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

IMPORT_C void ConstructL ( RFs & aFs,
const TDesC & aFilename,
TInt32 aId,
TUint aFileOffset
) [private]

Parameters

RFs & aFs
const TDesC & aFilename
TInt32 aId
TUint aFileOffset

ConstructL(RFile &, TInt32, TUint)

IMPORT_C void ConstructL ( RFile & aFile,
TInt32 aId,
TUint aFileOffset
) [private]

Parameters

RFile & aFile
TInt32 aId
TUint aFileOffset

ConstructL(CShiftedFileStore *, TStreamId)

IMPORT_C void ConstructL ( CShiftedFileStore * aFileStore,
TStreamId aStreamId
) [private]

Parameters

CShiftedFileStore * aFileStore
TStreamId aStreamId

CopyData(const CBitwiseBitmap &)

IMPORT_C TInt CopyData ( const CBitwiseBitmap & aSourceBitmap ) [private]

Parameters

const CBitwiseBitmap & aSourceBitmap

DataAddress()

TUint32 * DataAddress ( ) const [private]

DataStride()

IMPORT_C TInt DataStride ( ) const

DisplayMode()

IMPORT_C TDisplayMode DisplayMode ( ) const

DisplayMode(TInt, TInt)

TDisplayMode DisplayMode ( TInt aBpp,
TInt aColor
) [private, static]

Parameters

TInt aBpp
TInt aColor

DisplayModeArgCheck(TDisplayMode, TUint32 *)

TInt DisplayModeArgCheck ( TDisplayMode aDisplayMode,
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 aDisplayMode Requested display mode.
TUint32 * aDataAddress Bitmap data address.

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

void DoCompressScanLine ( 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
) 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)

void DoDecompressByteData ( TUint8 * aDestBuffer,
TInt aDestSize,
TUint8 * aSrceBuffer,
TInt aSrceSize
) [private]

Parameters

TUint8 * aDestBuffer
TInt aDestSize
TUint8 * aSrceBuffer
TInt aSrceSize

DoDecompressByteDataAltL(RReadStream &, TInt, TUint32 *)

void DoDecompressByteDataAltL ( RReadStream & aStream,
TInt aSrceSizeInBytes,
TUint32 * aBase
) [private]

Parameters

RReadStream & aStream
TInt aSrceSizeInBytes
TUint32 * aBase

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

void DoDecompressSixteenBitData ( TUint8 * aDestBuffer,
TInt aDestSize,
TUint8 * aSrceBuffer,
TInt aSrceSize
) [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 *)

void DoDecompressSixteenBitDataAltL ( RReadStream & aStream,
TInt aSrceSizeInBytes,
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)

void DoDecompressThirtyTwoABitData ( TUint8 * aDestBuffer,
TInt aDestSize,
TUint8 * aSrceBuffer,
TInt aSrceSize
) [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 *)

void DoDecompressThirtyTwoABitDataAltL ( RReadStream & aStream,
TInt aSrceSizeInBytes,
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)

void DoDecompressThirtyTwoUBitData ( TUint8 * aDestBuffer,
TInt aDestSize,
TUint8 * aSrceBuffer,
TInt aSrceSize
) [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 *)

void DoDecompressThirtyTwoUBitDataAltL ( RReadStream & aStream,
TInt aSrceSizeInBytes,
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)

void DoDecompressTwelveBitData ( TUint8 * aDestBuffer,
TInt aDestSize,
TUint8 * aSrceBuffer,
TInt aSrceSize
) [private]

Parameters

TUint8 * aDestBuffer
TInt aDestSize
TUint8 * aSrceBuffer
TInt aSrceSize

DoDecompressTwelveBitDataAltL(RReadStream &, TInt, TUint32 *)

void DoDecompressTwelveBitDataAltL ( RReadStream & aStream,
TInt aSrceSizeInBytes,
TUint32 * aBase
) [private]

Parameters

RReadStream & aStream
TInt aSrceSizeInBytes
TUint32 * aBase

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

void DoDecompressTwentyFourBitData ( TUint8 * aDestBuffer,
TInt aDestSize,
TUint8 * aSrceBuffer,
TInt aSrceSize
) [private]

Parameters

TUint8 * aDestBuffer
TInt aDestSize
TUint8 * aSrceBuffer
TInt aSrceSize

DoDecompressTwentyFourBitDataAltL(RReadStream &, TInt, TUint32 *)

void DoDecompressTwentyFourBitDataAltL ( RReadStream & aStream,
TInt aSrceSizeInBytes,
TUint32 * aBase
) [private]

Parameters

RReadStream & aStream
TInt aSrceSizeInBytes
TUint32 * aBase

DoExternalizeByteDataCompressedL(RWriteStream &, TUint8 *, TInt)

void DoExternalizeByteDataCompressedL ( RWriteStream & aStream,
TUint8 * aData,
TInt aSizeInBytes
) const [private]

Parameters

RWriteStream & aStream
TUint8 * aData
TInt aSizeInBytes

DoExternalizeDataCompressedL(RWriteStream &, TUint8 *, TInt)

void DoExternalizeDataCompressedL ( RWriteStream & aStream,
TUint8 * aData,
TInt aSizeInBytes
) const [private]

Parameters

RWriteStream & aStream
TUint8 * aData
TInt aSizeInBytes

DoExternalizeSixteenBitDataCompressedL(RWriteStream &, TUint8 *, TInt)

void DoExternalizeSixteenBitDataCompressedL ( RWriteStream & aStream,
TUint8 * aData,
TInt aSizeInBytes
) const [private]

Parameters

RWriteStream & aStream
TUint8 * aData
TInt aSizeInBytes

DoExternalizeThirtyTwoABitDataCompressedL(RWriteStream &, TUint8 *, TInt)

void DoExternalizeThirtyTwoABitDataCompressedL ( RWriteStream & aStream,
TUint8 * aData,
TInt aSizeInBytes
) 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)

void DoExternalizeThirtyTwoUBitDataCompressedL ( RWriteStream & aStream,
TUint8 * aData,
TInt aSizeInBytes
) 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)

void DoExternalizeTwelveBitDataCompressedL ( RWriteStream & aStream,
TUint8 * aData,
TInt aSizeInBytes
) const [private]

Parameters

RWriteStream & aStream
TUint8 * aData
TInt aSizeInBytes

DoExternalizeTwentyFourBitDataCompressedL(RWriteStream &, TUint8 *, TInt)

void DoExternalizeTwentyFourBitDataCompressedL ( RWriteStream & aStream,
TUint8 * aData,
TInt aSizeInBytes
) const [private]

Parameters

RWriteStream & aStream
TUint8 * aData
TInt aSizeInBytes

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

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

Parameters

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

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

void DoInternalizeCompressedDataL ( RReadStream & aStream,
TInt aSrceSize,
TUint32 * aBase,
TBitmapfileCompression aCompression
) [private]

Parameters

RReadStream & aStream
TInt aSrceSize
TUint32 * aBase
TBitmapfileCompression aCompression

DoInternalizeL(RReadStream &, TInt, TUint32 *)

void DoInternalizeL ( RReadStream & aStream,
TInt aSrceSize,
TUint32 * aBase
) [private]

Parameters

RReadStream & aStream
TInt aSrceSize
TUint32 * aBase

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

void DoStretchScanLine ( 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
) 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 void ExternalizeL ( RWriteStream & aStream,
const CFbsBitmap & aHandleBitmap
) const

Parameters

RWriteStream & aStream
const CFbsBitmap & aHandleBitmap

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

IMPORT_C void ExternalizeRectangleL ( 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 &)

void GenerateLineFromCompressed24BitData ( TUint8 * aDestBuffer,
const TPoint & aPixel,
TInt aLength,
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 &)

void GenerateLineFromCompressed32ABitData ( TUint8 * aDestBuffer,
const TPoint & aPixel,
TInt aLength,
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 &)

void GenerateLineFromCompressed32UBitData ( TUint8 * aDestBuffer,
const TPoint & aPixel,
TInt aLength,
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 &)

void GenerateLineFromCompressedEightBitData ( TUint8 * aDestBuffer,
const TPoint & aPixel,
TInt aLength,
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 &)

void GenerateLineFromCompressedSixteenBitData ( TUint8 * aDestBuffer,
const TPoint & aPixel,
TInt aLength,
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 &)

void GenerateLineFromCompressedTwelveBitData ( TUint8 * aDestBuffer,
const TPoint & aPixel,
TInt aLength,
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 &)

void GenerateLineFromPaletteCompressedData ( TUint8 * aDestBuffer,
const TPoint & aPixel,
TInt aLength,
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 * aDestBuffer Points to the destination buffer. After the call it will be filled with the decompressed data.
const TPoint & aPixel The decompression starts from this pixel
TInt aLength Length of requested decompressed data - in pixels
TUint32 * aBase Points to the beginning of compressed bitmap data
TLineScanningPosition & aLineScanningPosition

GetGrayPixelEx(TInt, TUint32 *)

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

Parameters

TInt aX
TUint32 * aScanLineAddress

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

void GetLineScanPos ( 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 & aLineScanPos Line scaning position. It is used by scan line decompression methods.
const TCompressionBookMark *& aComprBookMark If 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 * aBase It points to the beginning of the bitmap data.

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

IMPORT_C void GetPixel ( 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 & aColor It will be initialized with the pixel color value on success, otherwise aColor value will be left unchanged.
const TPoint & aPos Pixel coordinates.
TUint32 * aBase It points to the beginning of the bitmap data.
CFbsRasterizer * aRasterizer

GetRgbPixelEx(TInt, TUint32 *)

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

Parameters

TInt aX
TUint32 * aScanLineAddress

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

void GetRgbPixelExMany ( TInt aX,
TUint32 * aScanlinePtr,
TUint32 * aDest,
TInt aLength
) const [private]

Parameters

TInt aX
TUint32 * aScanlinePtr
TUint32 * aDest
TInt aLength

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

void GetRgbPixelExMany16M ( TInt aX,
TUint32 * aScanlinePtr,
TUint8 * aDest,
TInt aLength
) const [private]

Parameters

TInt aX
TUint32 * aScanlinePtr
TUint8 * aDest
TInt aLength

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

void GetRgbPixelExMany16MAP ( TInt aX,
TUint32 * aScanlinePtr,
TUint32 * aDest,
TInt aLength
) 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 aX The x co-ordinate the scanline data needs to be retrieved from.
TUint32 * aScanlinePtr The scanline pointer, i.e. the source data.
TUint32 * aDest The pointer to the destination buffer. This is where the output is stored.
TInt aLength The 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 void GetScanLine ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TBool aDither,
const TPoint & aDitherOffset,
TDisplayMode aDispMode,
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 void GetScanLine ( TUint32 *& aSlptr,
TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TBool aDither,
const TPoint & aDitherOffset,
TDisplayMode aDispMode
) 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 void GetScanLine ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TBool aDither,
const TPoint & aDitherOffset,
TDisplayMode aDispMode,
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 *)

void GetScanLineColor16 ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TUint32 * aScanlinePtr
) const [private]

Parameters

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

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

void GetScanLineColor16M ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TUint32 * aScanlinePtr
) const [private]

Parameters

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

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

void GetScanLineColor16MA ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TUint32 * aScanlinePtr
) const [private]

Parameters

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

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

void GetScanLineColor16MAP ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
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 *)

void GetScanLineColor16MU ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TUint32 * aScanlinePtr
) const [private]

Parameters

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

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

void GetScanLineColor256 ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TUint32 * aScanlinePtr
) const [private]

Parameters

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

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

void GetScanLineColor4K ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TUint32 * aScanlinePtr
) const [private]

Parameters

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

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

void GetScanLineColor64K ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TUint32 * aScanlinePtr
) const [private]

Parameters

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

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

void GetScanLineColorRgb ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TUint32 * aScanlinePtr
) const [private]

Parameters

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

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

void GetScanLineExBits ( TDes8 & aBuf,
TInt aX,
TInt aLength,
TUint32 * aScanlinePtr
) const [private]

Parameters

TDes8 & aBuf
TInt aX
TInt aLength
TUint32 * aScanlinePtr

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

void GetScanLineExBytes ( TDes8 & aBuf,
TInt aX,
TInt aLength,
TUint32 * aScanlinePtr
) const [private]

Parameters

TDes8 & aBuf
TInt aX
TInt aLength
TUint32 * aScanlinePtr

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

void GetScanLineGray16 ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TUint32 * aScanlinePtr
) const [private]

Parameters

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

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

void GetScanLineGray2 ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TBool aDither,
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 *)

void GetScanLineGray256 ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TUint32 * aScanlinePtr
) const [private]

Parameters

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

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

void GetScanLineGray4 ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aLength,
TBool aDither,
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 TInt GetScanLinePtr ( TUint32 *& aSlptr,
TPoint & aPixel,
TInt aLength,
TUint32 * aBase,
TLineScanningPosition & aLineScanningPosition
) const

Parameters

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

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

IMPORT_C TInt GetScanLinePtr ( 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 void GetVerticalScanLine ( TDes8 & aBuf,
TInt aX,
TBool aDither,
const TPoint & aDitherOffset,
TDisplayMode aDispMode,
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 & aBuf The buffer in which the vertical scanline will be returned.
TInt aX The x co-ordinate of the vertical scanline to get.
TBool aDither
const TPoint & aDitherOffset The dither offset of the bitmap.
TDisplayMode aDispMode Format to be used to write the data to the buffer.
TUint32 * aBase The bitmap's data start address.
CFbsRasterizer * aRasterizer

HardwareBitmapHandle()

IMPORT_C TInt HardwareBitmapHandle ( ) const

HashTo1bpp(TUint32, TBool, TBool)

TUint32 HashTo1bpp ( TUint32 aGray256,
TBool aOddX,
TBool aOddY
) const [private]

Parameters

TUint32 aGray256
TBool aOddX
TBool aOddY

HashTo2bpp(TUint32, TInt)

TUint32 HashTo2bpp ( TUint32 aGray256,
TInt aDitherIndex
) const [private]

Parameters

TUint32 aGray256
TInt aDitherIndex

Header()

IMPORT_C SEpocBitmapHeader Header ( ) 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 TInt HorizontalPixelsToTwips ( TInt aPixels ) const

Parameters

TInt aPixels

HorizontalTwipsToPixels(TInt)

IMPORT_C TInt HorizontalTwipsToPixels ( TInt aTwips ) const

Parameters

TInt aTwips

InitialDisplayMode()

TDisplayMode InitialDisplayMode ( ) const [private]

InternalizeHeaderL(RReadStream &, SEpocBitmapHeader &)

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

Parameters

RReadStream & aStream
SEpocBitmapHeader & aHeader

InternalizeL(RReadStream &)

IMPORT_C void InternalizeL ( RReadStream & aStream )

Internalizes the bit map contents from a stream.

Parameters

RReadStream & aStream The read stream containing the bit map.

IsColor(TDisplayMode)

TInt IsColor ( TDisplayMode aDispMode ) [private, static]

Parameters

TDisplayMode aDispMode

IsCompressed()

IMPORT_C TBool IsCompressed ( ) const

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

IsCompressedInRAM()

IMPORT_C TBool IsCompressedInRAM ( ) const

IsLargeBitmap()

IMPORT_C TBool IsLargeBitmap ( ) const

IsMonochrome(TUint32 *)

IMPORT_C TBool IsMonochrome ( 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 * aBase Bitmap's data base address

IsWordMonochrome(TUint32)

TBool IsWordMonochrome ( TUint32 aWord ) const [private]

Parameters

TUint32 aWord

PaletteAssign16BitColor(TUint8 *&, TUint32)

void PaletteAssign16BitColor ( TUint8 *& aDestPtr,
TUint32 aColor
) [private, static]

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

Parameters

TUint8 *& aDestPtr Address to write uncompressed data to. Will be incremented on return from function.
TUint32 aColor Color info to write.

PaletteAssign24BitColor(TUint8 *&, TUint32)

void PaletteAssign24BitColor ( TUint8 *& aDestPtr,
TUint32 aColor
) [private, static]

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

Parameters

TUint8 *& aDestPtr Address to write uncompressed data to. Will be incremented on return from function.
TUint32 aColor Color info to write.

PaletteAssign32BitColor(TUint8 *&, TUint32)

void PaletteAssign32BitColor ( TUint8 *& aDestPtr,
TUint32 aColor
) [private, static]

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

Parameters

TUint8 *& aDestPtr Address to write uncompressed data to. Will be incremented on return from function.
TUint32 aColor Color info to write.

PaletteBitsPerPixel(TInt)

TUint PaletteBitsPerPixel ( TInt aNumColors ) 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 aNumColors The 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 ( TInt aBitsPerPixel ) 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 aBitsPerPixel The 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)

void PaletteDecode1PixelPerByte ( TUint8 * aDataPtr,
TUint32 * aPalettePtr,
TUint8 *& aDestPtr,
TAssignFunction aAssignFunction
) [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 * aDataPtr Address in compressed data to read from
TUint32 * aPalettePtr Address of the start of the palette in the compressed data
TUint8 *& aDestPtr Address to write uncompressed data to. Will be incremented on return from function.
TAssignFunction aAssignFunction Function pointer to assigment function to use to write actual pixel data to uncompressed scanline

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

void PaletteDecode2PixelPerByte ( TUint8 * aDataPtr,
TUint32 * aPalettePtr,
TUint8 *& aDestPtr,
TAssignFunction aAssignFunction
) [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 * aDataPtr Address in compressed data to read from
TUint32 * aPalettePtr Address of the start of the palette in the compressed data
TUint8 *& aDestPtr Address to write uncompressed data to. Will be incremented on return from function.
TAssignFunction aAssignFunction Function pointer to assigment function to use to write actual pixel data to uncompressed scanline

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

void PaletteDecode4PixelPerByte ( TUint8 * aDataPtr,
TUint32 * aPalettePtr,
TUint8 *& aDestPtr,
TAssignFunction aAssignFunction
) [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 * aDataPtr Address in compressed data to read from
TUint32 * aPalettePtr Address of the start of the palette in the compressed data
TUint8 *& aDestPtr Address to write uncompressed data to. Will be incremented on return from function.
TAssignFunction aAssignFunction Function pointer to assigment function to use to write actual pixel data to uncompressed scanline

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

void PaletteDecode8PixelPerByte ( TUint8 * aDataPtr,
TUint32 * aPalettePtr,
TUint8 *& aDestPtr,
TAssignFunction aAssignFunction
) [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 * aDataPtr Address in compressed data to read from
TUint32 * aPalettePtr Address of the start of the palette in the compressed data
TUint8 *& aDestPtr Address to write uncompressed data to. Will be incremented on return from function.
TAssignFunction aAssignFunction Function pointer to assigment function to use to write actual pixel data to uncompressed scanline

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

void PaletteDecodeAndAssignGeneric ( TUint8 * aDataPtr,
TUint32 * aPalettePtr,
TUint8 *& aDestPtr,
TUint aStartPixel,
TUint aEndPixel,
TUint aCompressedPixelsPerByte,
TUint aCompressedBitsPerPixel
) const [private]

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

Parameters

TUint8 * aDataPtr Address in compressed data to read from
TUint32 * aPalettePtr Address of the start of the palette in the compressed data
TUint8 *& aDestPtr Address to write uncompressed data to. Will be incremented on return from function.
TUint aStartPixel Zero based position within the compressed byte of the first pixel to decompress
TUint aEndPixel Zero based position within the compressed byte of the last pixel to decompress
TUint aCompressedPixelsPerByte Number of pixels packed into each byte of the compressed data
TUint aCompressedBitsPerPixel Number of bits used to express each pixel in the compressed data. Nothing to do with the color depth of the image.

Reset()

IMPORT_C void Reset ( ) [private]

ScanLineAddress(TUint32 *, TUint)

IMPORT_C TUint32 * ScanLineAddress ( TUint32 * aBase,
TUint aY
) const

Parameters

TUint32 * aBase
TUint aY

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

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

Parameters

TLineScanningPosition & aLineScanningPosition
TUint32 * aBase
const CFbsBitmap * aFbsBitmap

SetDisplayMode(TDisplayMode, TUint32 *)

TInt SetDisplayMode ( TDisplayMode aDisplayMode,
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 aDisplayMode Requested display mode.
TUint32 * aDataAddress Bitmap data address.

SizeInPixels()

IMPORT_C TSize SizeInPixels ( ) const

SizeInTwips()

IMPORT_C TSize SizeInTwips ( ) const

SizeOfByteDataCompressed(TUint8 *, TInt)

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

Parameters

TUint8 * aData
TInt aSizeInBytes

SizeOfDataCompressed(TUint8 *, TInt)

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

Parameters

TUint8 * aData
TInt aSizeInBytes

SizeOfSixteenBitDataCompressed(TUint8 *, TInt)

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

Parameters

TUint8 * aData
TInt aSizeInBytes

SizeOfThirtyTwoABitDataCompressed(TUint8 *, TInt)

TInt SizeOfThirtyTwoABitDataCompressed ( TUint8 * aData,
TInt aSizeInBytes
) 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,
TInt aSizeInBytes
) 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,
TInt aSizeInBytes
) const [private]

Parameters

TUint8 * aData
TInt aSizeInBytes

SizeOfTwentyFourBitDataCompressed(TUint8 *, TInt)

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

Parameters

TUint8 * aData
TInt aSizeInBytes

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

IMPORT_C void StretchScanLine ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aClipStrchX,
TInt aClipStrchLen,
TInt aStretchLength,
TInt aOrgX,
TInt aOrgLen,
const TPoint & aDitherOffset,
TDisplayMode aDispMode,
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 void StretchScanLine ( TDes8 & aBuf,
const TPoint & aPixel,
TInt aClipStrchX,
TInt aClipStrchLen,
TInt aStretchLength,
TInt aOrgX,
TInt aOrgLen,
const TPoint & aDitherOffset,
TDisplayMode aDispMode,
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 * aDataAddress Bitmap data address.

TrueColorPointerCompare(TUint8 *, TUint8, TUint8, TUint8)

TBool TrueColorPointerCompare ( TUint8 * aColorPointer,
TUint8 aComponent1,
TUint8 aComponent2,
TUint8 aComponent3
) const [private]

Parameters

TUint8 * aColorPointer
TUint8 aComponent1
TUint8 aComponent2
TUint8 aComponent3

Uid()

IMPORT_C TUid Uid ( ) const

UpdateBitmapProperties(TDisplayMode)

void UpdateBitmapProperties ( TDisplayMode aNewDisplayMode ) [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 aNewDisplayMode The new display mode.

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

void UpdateBookMark ( 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 & aLineScanPos Line scaning position.
TCompressionBookMark * aComprBookMark If the bitmap is compressed in RAM, aComprBookMark points to its compression bookmark data.
const TUint8 * aBase It points to the beginning of the bitmap data.

UpdatePaddingData(TUint32 *)

void UpdatePaddingData ( 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 TInt VerticalPixelsToTwips ( TInt aPixels ) const

Parameters

TInt aPixels

VerticalTwipsToPixels(TInt)

IMPORT_C TInt VerticalTwipsToPixels ( TInt aTwips ) const

Parameters

TInt aTwips

WhiteFill(TUint8 *, TInt, TDisplayMode)

void WhiteFill ( TUint8 * aData,
TInt aDataSize,
TDisplayMode aDispMode
) [private, static]

Parameters

TUint8 * aData
TInt aDataSize
TDisplayMode aDispMode

operator delete(TAny *)

IMPORT_C void operator delete ( TAny * ) [private]

Parameters

TAny *

operator delete(TAny *, TAny *)

void operator 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::TSettings iSettings [private]

TInt iSpare

TInt iSpare [private]

TUid iUid

TUid iUid [private]