VMR9AlphaBitmap structure
The VMR9AlphaBitmap structure is used with the IVMRMixerBitmap9 interface when an application provides a static bitmap for alpha blending with the video frame.
Syntax
typedef struct _VMR9AlphaBitmap { DWORD dwFlags; HDC hdc; IDirect3DSurface9 *pDDS; RECT rSrc; VMR9NormalizedRect rDest; FLOAT fAlpha; COLORREF clrSrcKey; DWORD dwFilterMode; } VMR9AlphaBitmap;
Members
- dwFlags
-
Bitwise OR of flags from the VMR9AlphaBitmapFlags enumeration type.
- hdc
-
Handle to the GDI device context (HDC) for the bitmap. If this member contains a non-NULL value, set pDDS to NULL and set the VMR9AlphaBitmap_hDC flag in the dwFlags member. The device context is not compatible with GDI+.
- pDDS
-
Pointer to the IDirect3DSurface9 interface of a Direct3D surface that contains the bitmap. If this member contains a valid pointer, set the hdc member to NULL. The surface format must be D3DFMT_X8R8G8B8 (32-bit RGB) or D3DFMT_A8R8G8B8 (32-bit RGB with per-pixel alpha). The surface must be allocated from the D3DPOOL_SYSTEMMEM pool.
- rSrc
-
Specifies the rectangle to copy from the source image. This rectangle is specified relative to the GDI device context or the DirectDraw surface.
When calling IVMRMixerBitmap9::SetAlphaBitmap, the source rectangle must be valid if a GDI bitmap is specified in the hdc member. On the other hand, if a Direct3D surface is specified in the pDDS member, then you can either set rSrc to a valid rectangle, or use the entire surface by setting the VMR9AlphaBitmap_EntireDDS flag in dwFlags.
When calling IVMRMixerBitmap9::UpdateAlphaBitmapParameters, rSrc is always optional, and is used if dwFlags contains the VMR9AlphaBitmap_SrcRect flag.
- rDest
-
Specifies the destination rectangle in composition space.
- fAlpha
-
Specifies the alpha blending value; must be a value from 0.0 to 1.0 (inclusive).
- clrSrcKey
-
Specifies the source color key. This value is used if the dwFlags member contains the VMR9AlphaBitmap_SrcColorKey. A color key cannot be used with a Direct3D surface that contains per-pixel alpha.
- dwFilterMode
-
One of the following flags from the VMR9MixerPrefs enumeration, or zero to specify no filtering.
This structure member is used only if the dwFlags member contains the VMR9AlphaBitmap_FilterMode flag.
Point filtering is particularly useful for images that contain text and do not need to be stretched prior to mixing.
Remarks
To get the HDC for a GDI bitmap, do the following:
- Call GetDC to get the device context for the application's video window.
- Call CreateCompatibleDC to create a compatible device context.
- Call SelectObject to select the bitmap into the device context obtained in the previous step.
When you are done, release the device context by calling DeleteDC.
Requirements
|
Header |
|
|---|
See also
Send comments about this topic to Microsoft
Build date: 11/21/2012