class CBitwiseBitmap |
BitGdi bitmap class (pseudo-CXxx class). WARNING: Class for internal use ONLY. Compatibility is not guaranteed in future releases.
Private Attributes | |
---|---|
TInt | iByteWidth |
TInt | iDataOffset |
SEpocBitmapHeader | iHeader |
RHeap * | iHeap |
TBool | iIsCompressedInRAM |
CChunkPile * | iPile |
struct CBitwiseBitmap::TSettings | iSettings |
TInt | iSpare |
TUid | iUid |
IMPORT_C | CBitwiseBitmap | ( | RHeap * | aHeap, |
CChunkPile * | aPile | |||
) | [private] |
RHeap * aHeap | |
CChunkPile * aPile |
void | AdjustXCoord | ( | TInt & | aX | ) | const [private] |
The method adjusts specified X coordinate if it is negative or outside the bitmap.
TInt & aX | - a reference to x coordinate - the value might be changed after the method call. |
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
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
TInt | Bpp | ( | TDisplayMode | aDispMode | ) | [private, static] |
TDisplayMode aDispMode |
TInt | ByteWidth | ( | TInt | aPixelWidth, |
TDisplayMode | aDispMode | |||
) | [private, static] |
TInt aPixelWidth | |
TDisplayMode aDispMode |
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 .
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. |
IMPORT_C TInt | CheckBackgroundCompressData | ( | ) |
Set a flag to indicate that this bitmap has to be compressed in the FBServer background thread
void | CheckHeaderIsValidL | ( | const SEpocBitmapHeader & | aHeader | ) | [private, static] |
const SEpocBitmapHeader & aHeader |
TBool | ColorAlphaPointerCompare | ( | TUint8 * | aColorPointer, |
TUint8 | aComponent1, | |||
TUint8 | aComponent2, | |||
TUint8 | aComponent3, | |||
TUint8 | aComponent4 | |||
) | const [private] |
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).
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).
TBitmapfileCompressionScheme aScheme | The type of bitmap file compression. |
TInt | CompressedFormatInfo | ( | TDisplayMode | aDispMode, |
TInt & | aBytesPerPack, | |||
TInt & | aBytesPerCompressed | |||
) | [private, static] |
TDisplayMode aDispMode | |
TInt & aBytesPerPack | |
TInt & aBytesPerCompressed |
TBitmapfileCompression | CompressionType | ( | TInt | aBpp, |
TInt | aColor | |||
) | [private, static] |
IMPORT_C TInt | Construct | ( | const TSize & | aSize, |
TDisplayMode | aDispMode, | |||
TUid | aCreatorUid | |||
) | [private] |
const TSize & aSize | |
TDisplayMode aDispMode | |
TUid aCreatorUid |
IMPORT_C TInt | ConstructExtended | ( | const TSize & | aSize, |
TDisplayMode | aDispMode, | |||
TUid | aType, | |||
TInt | aDataSize | |||
) | [private] |
const TSize & aSize | |
TDisplayMode aDispMode | |
TUid aType | |
TInt aDataSize |
IMPORT_C void | ConstructL | ( | RFs & | aFs, |
const TDesC & | aFilename, | |||
TInt32 | aId, | |||
TUint | aFileOffset | |||
) | [private] |
IMPORT_C void | ConstructL | ( | RFile & | aFile, |
TInt32 | aId, | |||
TUint | aFileOffset | |||
) | [private] |
IMPORT_C void | ConstructL | ( | CShiftedFileStore * | aFileStore, |
TStreamId | aStreamId | |||
) | [private] |
CShiftedFileStore * aFileStore | |
TStreamId aStreamId |
IMPORT_C TInt | CopyData | ( | const CBitwiseBitmap & | aSourceBitmap | ) | [private] |
const CBitwiseBitmap & aSourceBitmap |
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 .
TDisplayMode aDisplayMode | Requested display mode. |
TUint32 * aDataAddress | Bitmap data address. |
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] |
void | DoDecompressByteData | ( | TUint8 * | aDestBuffer, |
TInt | aDestSize, | |||
TUint8 * | aSrceBuffer, | |||
TInt | aSrceSize | |||
) | [private] |
void | DoDecompressByteDataAltL | ( | RReadStream & | aStream, |
TInt | aSrceSizeInBytes, | |||
TUint32 * | aBase | |||
) | [private] |
RReadStream & aStream | |
TInt aSrceSizeInBytes | |
TUint32 * aBase |
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
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.
RReadStream & aStream | |
TInt aSrceSizeInBytes | |
TUint32 * aBase |
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
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.
RReadStream & aStream | |
TInt aSrceSizeInBytes | |
TUint32 * aBase |
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
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.
RReadStream & aStream | |
TInt aSrceSizeInBytes | |
TUint32 * aBase |
void | DoDecompressTwelveBitData | ( | TUint8 * | aDestBuffer, |
TInt | aDestSize, | |||
TUint8 * | aSrceBuffer, | |||
TInt | aSrceSize | |||
) | [private] |
void | DoDecompressTwelveBitDataAltL | ( | RReadStream & | aStream, |
TInt | aSrceSizeInBytes, | |||
TUint32 * | aBase | |||
) | [private] |
RReadStream & aStream | |
TInt aSrceSizeInBytes | |
TUint32 * aBase |
void | DoDecompressTwentyFourBitData | ( | TUint8 * | aDestBuffer, |
TInt | aDestSize, | |||
TUint8 * | aSrceBuffer, | |||
TInt | aSrceSize | |||
) | [private] |
void | DoDecompressTwentyFourBitDataAltL | ( | RReadStream & | aStream, |
TInt | aSrceSizeInBytes, | |||
TUint32 * | aBase | |||
) | [private] |
RReadStream & aStream | |
TInt aSrceSizeInBytes | |
TUint32 * aBase |
void | DoExternalizeByteDataCompressedL | ( | RWriteStream & | aStream, |
TUint8 * | aData, | |||
TInt | aSizeInBytes | |||
) | const [private] |
RWriteStream & aStream | |
TUint8 * aData | |
TInt aSizeInBytes |
void | DoExternalizeDataCompressedL | ( | RWriteStream & | aStream, |
TUint8 * | aData, | |||
TInt | aSizeInBytes | |||
) | const [private] |
RWriteStream & aStream | |
TUint8 * aData | |
TInt aSizeInBytes |
void | DoExternalizeSixteenBitDataCompressedL | ( | RWriteStream & | aStream, |
TUint8 * | aData, | |||
TInt | aSizeInBytes | |||
) | const [private] |
RWriteStream & aStream | |
TUint8 * aData | |
TInt aSizeInBytes |
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
RWriteStream & aStream | |
TUint8 * aData | |
TInt aSizeInBytes |
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
RWriteStream & aStream | |
TUint8 * aData | |
TInt aSizeInBytes |
void | DoExternalizeTwelveBitDataCompressedL | ( | RWriteStream & | aStream, |
TUint8 * | aData, | |||
TInt | aSizeInBytes | |||
) | const [private] |
RWriteStream & aStream | |
TUint8 * aData | |
TInt aSizeInBytes |
void | DoExternalizeTwentyFourBitDataCompressedL | ( | RWriteStream & | aStream, |
TUint8 * | aData, | |||
TInt | aSizeInBytes | |||
) | const [private] |
RWriteStream & aStream | |
TUint8 * aData | |
TInt aSizeInBytes |
TInt | DoGetScanLinePtr | ( | TUint32 *& | aSlptr, |
TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aBase, | |||
TLineScanningPosition & | aLineScanningPosition | |||
) | const [private] |
TUint32 *& aSlptr | |
TPoint & aPixel | |
TInt aLength | |
TUint32 * aBase | |
TLineScanningPosition & aLineScanningPosition |
void | DoInternalizeCompressedDataL | ( | RReadStream & | aStream, |
TInt | aSrceSize, | |||
TUint32 * | aBase, | |||
TBitmapfileCompression | aCompression | |||
) | [private] |
RReadStream & aStream | |
TInt aSrceSize | |
TUint32 * aBase | |
TBitmapfileCompression aCompression |
void | DoInternalizeL | ( | RReadStream & | aStream, |
TInt | aSrceSize, | |||
TUint32 * | aBase | |||
) | [private] |
RReadStream & aStream | |
TInt aSrceSize | |
TUint32 * aBase |
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] |
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream, |
const CFbsBitmap & | aHandleBitmap | |||
) | const |
RWriteStream & aStream | |
const CFbsBitmap & aHandleBitmap |
IMPORT_C void | ExternalizeRectangleL | ( | RWriteStream & | aStream, |
const TRect & | aRect, | |||
const CFbsBitmap & | aHandleBitmap | |||
) | const |
RWriteStream & aStream | |
const TRect & aRect | |
const CFbsBitmap & aHandleBitmap |
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
TUint8 * aDestBuffer | |
const TPoint & aPixel | |
TInt aLength | |
TUint32 * aBase | |
TLineScanningPosition & aLineScanningPosition |
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
TUint8 * aDestBuffer | |
const TPoint & aPixel | |
TInt aLength | |
TUint32 * aBase | |
TLineScanningPosition & aLineScanningPosition |
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
TUint8 * aDestBuffer | |
const TPoint & aPixel | |
TInt aLength | |
TUint32 * aBase | |
TLineScanningPosition & aLineScanningPosition |
void | GenerateLineFromCompressedEightBitData | ( | TUint8 * | aDestBuffer, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aBase, | |||
TLineScanningPosition & | aLineScanningPosition | |||
) | const [private] |
TUint8 * aDestBuffer | |
const TPoint & aPixel | |
TInt aLength | |
TUint32 * aBase | |
TLineScanningPosition & aLineScanningPosition |
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
TUint8 * aDestBuffer | |
const TPoint & aPixel | |
TInt aLength | |
TUint32 * aBase | |
TLineScanningPosition & aLineScanningPosition |
void | GenerateLineFromCompressedTwelveBitData | ( | TUint8 * | aDestBuffer, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aBase, | |||
TLineScanningPosition & | aLineScanningPosition | |||
) | const [private] |
TUint8 * aDestBuffer | |
const TPoint & aPixel | |
TInt aLength | |
TUint32 * aBase | |
TLineScanningPosition & aLineScanningPosition |
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)
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 |
TUint8 | GetGrayPixelEx | ( | TInt | aX, |
TUint32 * | aScanLineAddress | |||
) | const [private] |
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.
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. |
IMPORT_C void | GetPixel | ( | TRgb & | aColor, |
const TPoint & | aPos, | |||
TUint32 * | aBase, | |||
CFbsRasterizer * | aRasterizer | |||
) | const |
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 |
TRgb | GetRgbPixelEx | ( | TInt | aX, |
TUint32 * | aScanLineAddress | |||
) | const [private] |
void | GetRgbPixelExMany | ( | TInt | aX, |
TUint32 * | aScanlinePtr, | |||
TUint32 * | aDest, | |||
TInt | aLength | |||
) | const [private] |
void | GetRgbPixelExMany16M | ( | TInt | aX, |
TUint32 * | aScanlinePtr, | |||
TUint8 * | aDest, | |||
TInt | aLength | |||
) | const [private] |
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).
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. |
IMPORT_C void | GetScanLine | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TBool | aDither, | |||
const TPoint & | aDitherOffset, | |||
TDisplayMode | aDispMode, | |||
TUint32 * | aBase, | |||
TLineScanningPosition & | aLineScanningPosition | |||
) | const |
TDes8 & aBuf | |
const TPoint & aPixel | |
TInt aLength | |
TBool aDither | |
const TPoint & aDitherOffset | |
TDisplayMode aDispMode | |
TUint32 * aBase | |
TLineScanningPosition & aLineScanningPosition |
IMPORT_C void | GetScanLine | ( | TUint32 *& | aSlptr, |
TDes8 & | aBuf, | |||
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TBool | aDither, | |||
const TPoint & | aDitherOffset, | |||
TDisplayMode | aDispMode | |||
) | const |
IMPORT_C void | GetScanLine | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TBool | aDither, | |||
const TPoint & | aDitherOffset, | |||
TDisplayMode | aDispMode, | |||
TUint32 * | aBase | |||
) | const |
void | GetScanLineColor16 | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
void | GetScanLineColor16M | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
void | GetScanLineColor16MA | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
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.
void | GetScanLineColor16MU | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
void | GetScanLineColor256 | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
void | GetScanLineColor4K | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
void | GetScanLineColor64K | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
void | GetScanLineColorRgb | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
void | GetScanLineExBits | ( | TDes8 & | aBuf, |
TInt | aX, | |||
TInt | aLength, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
void | GetScanLineExBytes | ( | TDes8 & | aBuf, |
TInt | aX, | |||
TInt | aLength, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
void | GetScanLineGray16 | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
void | GetScanLineGray2 | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TBool | aDither, | |||
const TPoint & | aDitherOffset, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
void | GetScanLineGray256 | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
void | GetScanLineGray4 | ( | TDes8 & | aBuf, |
const TPoint & | aPixel, | |||
TInt | aLength, | |||
TBool | aDither, | |||
const TPoint & | aDitherOffset, | |||
TUint32 * | aScanlinePtr | |||
) | const [private] |
IMPORT_C TInt | GetScanLinePtr | ( | TUint32 *& | aSlptr, |
TPoint & | aPixel, | |||
TInt | aLength, | |||
TUint32 * | aBase, | |||
TLineScanningPosition & | aLineScanningPosition | |||
) | const |
TUint32 *& aSlptr | |
TPoint & aPixel | |
TInt aLength | |
TUint32 * aBase | |
TLineScanningPosition & aLineScanningPosition |
IMPORT_C TInt | GetScanLinePtr | ( | TUint32 *& | aSlptr, |
TInt & | aLength, | |||
TPoint & | aPixel, | |||
TUint32 * | aBase, | |||
TLineScanningPosition & | aLineScanningPosition | |||
) | const |
TUint32 *& aSlptr | |
TInt & aLength | |
TPoint & aPixel | |
TUint32 * aBase | |
TLineScanningPosition & aLineScanningPosition |
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.
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 |
TUint32 | HashTo1bpp | ( | TUint32 | aGray256, |
TBool | aOddX, | |||
TBool | aOddY | |||
) | const [private] |
TUint32 | HashTo2bpp | ( | TUint32 | aGray256, |
TInt | aDitherIndex | |||
) | const [private] |
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.
IMPORT_C TInt | HorizontalPixelsToTwips | ( | TInt | aPixels | ) | const |
TInt aPixels |
IMPORT_C TInt | HorizontalTwipsToPixels | ( | TInt | aTwips | ) | const |
TInt aTwips |
IMPORT_C void | InternalizeHeaderL | ( | RReadStream & | aStream, |
SEpocBitmapHeader & | aHeader | |||
) | [static] |
RReadStream & aStream | |
SEpocBitmapHeader & aHeader |
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) |
Internalizes the bit map contents from a stream.
RReadStream & aStream | The read stream containing the bit map. |
TInt | IsColor | ( | TDisplayMode | aDispMode | ) | [private, static] |
TDisplayMode aDispMode |
IMPORT_C TBool | IsCompressed | ( | ) | const |
Check for a bitmap if it is compressed in some manner.
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.
TUint32 * aBase | Bitmap's data base address |
TBool | IsWordMonochrome | ( | TUint32 | aWord | ) | const [private] |
TUint32 aWord |
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
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
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
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
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. |
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.
TInt aBitsPerPixel | The bits per pixel value to transform into bytes |
TInt | PaletteCompress | ( | ) | [private] |
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.
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
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 |
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
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 |
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
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 |
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
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 |
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
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. |
IMPORT_C TUint32 * | ScanLineAddress | ( | TUint32 * | aBase, |
TUint | aY | |||
) | const |
IMPORT_C void | SetCompressionBookmark | ( | TLineScanningPosition & | aLineScanningPosition, |
TUint32 * | aBase, | |||
const CFbsBitmap * | aFbsBitmap | |||
) |
TLineScanningPosition & aLineScanningPosition | |
TUint32 * aBase | |
const CFbsBitmap * aFbsBitmap |
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.
TDisplayMode aDisplayMode | Requested display mode. |
TUint32 * aDataAddress | Bitmap data address. |
TInt | SizeOfByteDataCompressed | ( | TUint8 * | aData, |
TInt | aSizeInBytes | |||
) | const [private] |
TInt | SizeOfDataCompressed | ( | TUint8 * | aData, |
TInt | aSizeInBytes | |||
) | const [private] |
TInt | SizeOfSixteenBitDataCompressed | ( | TUint8 * | aData, |
TInt | aSizeInBytes | |||
) | const [private] |
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
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
TInt | SizeOfTwelveBitDataCompressed | ( | TUint8 * | aData, |
TInt | aSizeInBytes | |||
) | const [private] |
TInt | SizeOfTwentyFourBitDataCompressed | ( | TUint8 * | aData, |
TInt | aSizeInBytes | |||
) | const [private] |
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 |
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 |
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.
TUint32 * aDataAddress | Bitmap data address. |
TBool | TrueColorPointerCompare | ( | TUint8 * | aColorPointer, |
TUint8 | aComponent1, | |||
TUint8 | aComponent2, | |||
TUint8 | aComponent3 | |||
) | const [private] |
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 .
TDisplayMode aNewDisplayMode | The new display mode. |
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.
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. |
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.
TUint32 * aData |
IMPORT_C TInt | VerticalPixelsToTwips | ( | TInt | aPixels | ) | const |
TInt aPixels |
IMPORT_C TInt | VerticalTwipsToPixels | ( | TInt | aTwips | ) | const |
TInt aTwips |
void | WhiteFill | ( | TUint8 * | aData, |
TInt | aDataSize, | |||
TDisplayMode | aDispMode | |||
) | [private, static] |
TUint8 * aData | |
TInt aDataSize | |
TDisplayMode aDispMode |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.