|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
The IDirectDrawSurface5::Bltmethod performs a bit block transfer. This method does not support Z-buffering or alpha blending (see alpha channel) during blit operations.
HRESULT Blt( LPRECT lpDestRect , LPDIRECTDRAWSURFACE4 lpDDSrcSurface , LPRECT lpSrcRect , DWORD dwFlags , LPDDBLTFX lpDDBltFx );
The following flags are defined:
|DDBLT_COLORFILL||Uses the dwFillColormember of the DDBLTFXstructure as the RGB color that fills the destination rectangle on the destination surface.|
|DDBLT_DDFX||Uses the dwDDFXmember of the DDBLTFXstructure to specify the effects to use for this blit.|
|DDBLT_DDROPS||Uses the dwDDROPmember of the DDBLTFXstructure to specify the raster operations (ROPS) that are not part of the Win32 API.|
|DDBLT_DEPTHFILL||Uses the dwFillDepthmember of the DDBLTFXstructure as the depth value with which to fill the destination rectangle on the destination Z-buffer surface.|
|DDBLT_KEYDESTOVERRIDE||Uses the ddckDestColorkeymember of the DDBLTFXstructure as the color key for the destination surface.|
|DDBLT_KEYSRCOVERRIDE||Uses the ddckSrcColorkeymember of the DDBLTFXstructure as the color key for the source surface.|
|DDBLT_ROP||Uses the dwROPmember of the DDBLTFXstructure for the ROP for this blit. These ROPs are the same as those defined in the Win32 API.|
|DDBLT_ROTATIONANGLE||Uses the dwRotationAnglemember of the DDBLTFXstructure as the rotation angle (specified in 1/100th of a degree) for the surface.|
Color key flags
|DDBLT_KEYDEST||Uses the color key associated with the destination surface.|
|DDBLT_KEYSRC||Uses the color key associated with the source surface.|
|DDBLT_ASYNC||Performs this blit asynchronously through the FIFO in the order received. If no room is available in the FIFO hardware, the call fails.|
|DDBLT_WAIT||Postpones the DDERR_WASSTILLDRAWING return value if the blitter is busy, and returns as soon as the blit can be set up or another error occurs.|
Obsolete and unsupported flags
|All "DDBLT_ALPHA" flag values.||Not currently implemented.|
|All "DDBLT_ZBUFFER" flag values||This method does not currently support Z-aware blit operations. None of the flags beginning with "DDBLT_ZBUFFER" are supported in this release.|
If the method succeeds, the return value is DD_OK.
If the method fails, the return value may be one of the following error values:
This method is capable of synchronous or asynchronous blits (the default behavior), either display memory to display memory, display memory to system memory, system memory to display memory, or system memory to system memory. The blits can be performed by using source color keys, and destination color keys. Arbitrary stretching or shrinking will be performed if the source and destination rectangles are not the same size.
Typically, IDirectDrawSurface5::Bltreturns immediately with an error if the blitter is busy and the blit could not be set up. Specify the DDBLT_WAIT flag to request a synchronous blit. When you include the DDBLT_WAIT flag, the method waits until the blit can be set up or another error occurs before it returns.
The RECTstructures are defined so that the rightand bottommembers are exclusive: rightminus leftequals the width of the rectangle, not one less than the width.
|Runs on||Versions||Declared in||Link to|
|Windows CE OS||2.12 or later. Version 2.12 requires DXPAK 1.0 or later.||ddraw.h||ddraw.lib|