HRESULT BltFast(DWORD dwX, DWORD dwY,
LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect,
DWORD dwTrans);
Performs a source copy blit or transparent blit by using a source color key or destination color key. This method always attempts an asynchronous blit if it is supported by the hardware.
·Returns DD_OK if successful, or one of the following error values otherwise:
dwX and dwY
The x- and y-coordinates to blit to on the destination surface.
lpDDSrcSurface
Address of the DirectDraw surface that is the source for the blit operation.
lpSrcRect
Address of a RECT structure that defines the upper-left and lower-right points of the rectangle on the source surface to be blitted from.
dwTrans
Type of transfer.
Specifies a transparent blit that uses the destination's color key.
Specifies a normal copy blit with no transparency.
Specifies a transparent blit that uses the source's color key.
Postpones the DDERR_WASSTILLDRAWING message if the blitter is busy, and returns as soon as the blit can be set up or another error occurs.
This method works only on display memory surfaces and cannot clip when blitting. The software implementation of IDirectDrawSurface2::BltFast is 10 percent faster than the IDirectDrawSurface2::Blt method. However, there is no speed difference between the two if display hardware is being used.
Typically, IDirectDrawSurface2::BltFast returns immediately with an error if the blitter is busy and the blit cannot be set up. You can use the DDBLTFAST_WAIT flag, however, if you want this method to not return until either the blit can be set up or another error occurs.