class TGopBitBltAlphaBitmap : public TGraphicsOperation |
An accelerated graphics operation that copies a rectangular region of one bitmap into another using alpha blending values provided in a third bitmap.
The way alpha blending works is as follows: if the alpha value is the maximum, the source pixel is opaque, in other words, the full colour of the pixel is written to the destination. If the alpha value is zero, the source pixel is fully transparent, and the destination is left unaltered. Values in-between cause blending with the following formula:
Destination = Source*Alpha/max_Alpha + Destination*(max_Alpha-Alpha)/max_Alpha
Colour alpha-bitmaps specify red, green and blue alpha values for each pixel, greyscale bitmaps specify a single alpha value for each pixel. The maximum alpha value depends on the bitmap's display mode. For example, 255 is the maximum for an EGray256 or EColor16M bitmap. The maximum is less for bitmaps which use fewer bits per colour component.
Supported bitmap formats than can be used as alpha bitmaps are given in TGraphicsAcceleratorCaps::iAlphaBitmap.
Objects of this class can be passed to a graphics accelerator's Operation() function either individually, or in a buffer.
Public Member Functions | |
---|---|
TGopBitBltAlphaBitmap(const TPoint &, TAcceleratedBitmapSpec, TRect &, TAcceleratedBitmapSpec) |
Inherited Enumerations | |
---|---|
TGraphicsOperation:TGopFunction |
Public Attributes | |
---|---|
TAcceleratedBitmapSpec | iAlphaBitmap |
TPoint | iDestination |
TAcceleratedBitmapSpec | iSourceBitmap |
TRect | iSourceRect |
Inherited Attributes | |
---|---|
TGraphicsOperation::iFunction | |
TGraphicsOperation::iSize |
TGopBitBltAlphaBitmap | ( | const TPoint & | aDestination, |
TAcceleratedBitmapSpec | aSourceBitmap, | ||
TRect & | aSourceRect, | ||
TAcceleratedBitmapSpec | aAlphaBitmap | ||
) | [inline] |
Constructor with a position, two bitmap specs and a rectangle.
const TPoint & aDestination | The destination for the top left hand corner of the portion of the source bitmap. |
TAcceleratedBitmapSpec aSourceBitmap | A handle to the source bitmap, and other information needed to draw it. |
TRect & aSourceRect | A rectangle within the source bitmap. Its coordinates are relative to the top left of the source bitmap. Defines the part of the source bitmap to be copied. |
TAcceleratedBitmapSpec aAlphaBitmap | A handle to the alpha bitmap, the bitmap that contains alpha blending values. |
TAcceleratedBitmapSpec | iAlphaBitmap |
A handle to the alpha bitmap, the bitmap that contains alpha blending values.
TPoint | iDestination |
The destination for the top left hand corner of the portion of the source bitmap.
TAcceleratedBitmapSpec | iSourceBitmap |
A handle to the source bitmap, and other information needed to access it.
TRect | iSourceRect |
A rectangle defining the part of the source bitmap to be copied.
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.