|
||
class TGopAlphaBlendOneBitmap : public TGraphicsOperation;
An accelerated graphics operation that copies a rectangular region of a bitmap blended with the screen image to the screen, using alpha blending values provided in an alpha bitmap to blend the corresponding entries in the bitmap and on the screen.
The way alpha blending works is as follows: if the alpha value is the maximum, the pixel from the source bitmap is opaque, in other words, the full colour of the pixel is written to the destination. If the alpha value is zero, the pixel from the source bitmap is fully transparent, in other words, the full colour of the pixel on the screen is used. Values in-between cause blending with the following formula:
Destination = Source*Alpha/max_Alpha + Screen*(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.
TGraphicsOperation
- Abstract base class for all graphics operations.
TGopAlphaBlendOneBitmap
- An accelerated graphics operation that copies a rectangular region of a bitmap b...
Defined in TGopAlphaBlendOneBitmap
:
TGopAlphaBlendOneBitmap(const TPoint &,TAcceleratedBitmapSpec,TRect &,TAcceleratedBitmapSpec,const TPoint &)
Constructor with a position, two bitmap specs and a rectangle. iAlphaBmp
A handle to the alpha bitmap, the bitmap that contains alpha blending values. iAlphaPt
Position of the first pixel in the alpha bitmap to be used for alpha blending. iDestination
The destination for the top left hand corner of the portion of the source bitmap...iSourceBmp
A handle to the source bitmap, and other information needed to access it. iSourceRect
A rectangle defining the part of the bitmap to be copied. Inherited from TGraphicsOperation
:
Append(TInt,TAny *)
EAlphaBlendOneBitmap
EAlphaBlendTwoBitmaps
EBitBlt
EBitBltAlphaBitmap
EBitBltAlphaChannel
EBitBltMasked
EBitBltTransparent
EChunkTest
EFadeRect
EFilledPolygon
EFilledPolygonWithPattern
EFilledRect
EFilledRectUsingDrawMode
EFilledRectWithPattern
EInvertRect
EScaledBitBlt
EScaledBitBltAlphaBitmap
EScaledBitBltAlphaChannel
EScaledBitBltMasked
EScaledBitBltTransparent
EVirtualAddressTest
Function()const
Next()const
Size()const
TGopFunction
TGraphicsOperation(TGopFunction,TInt)
iFunction
iSize
TGraphicsAcceleratorCaps::iAlphaBitmap
Specifies the supported alpha bitmap types. Uses a bit flag for each TAlphaBitma...TGopAlphaBlendOneBitmap(const TPoint &,TAcceleratedBitmapSpec,TRect &,TAcceleratedBitmapSpec,const TPoint &)
inline TGopAlphaBlendOneBitmap(const TPoint &aDestination, TAcceleratedBitmapSpec aSourceBmp, TRect &aSourceRect, TAcceleratedBitmapSpec
aAlphaBmp, const TPoint &aAlphaPt);
Constructor with a position, two bitmap specs and a rectangle.
|
TPoint iDestination;
The destination for the top left hand corner of the portion of the source bitmap.
TAcceleratedBitmapSpec iSourceBmp;
A handle to the source bitmap, and other information needed to access it.
TAcceleratedBitmapSpec iAlphaBmp;
A handle to the alpha bitmap, the bitmap that contains alpha blending values.
TPoint iAlphaPt;
Position of the first pixel in the alpha bitmap to be used for alpha blending.