IDirectDrawSurface::BltFast

HRESULT BltFast(DWORD dwX, DWORD dwY,

LPDIRECTDRAWSURFACE lpDDSrcSurface,

LPRECT lpSrcRect, DWORD dwTrans);

Performs a source copy blit or transparent blit using a source or destination color key. This method always attempts an asynchronous blit if this is supported by the hardware.

·Returns DD_OK if successful, or one of the following error values otherwise:

DDERR_EXCEPTION DDERR_GENERIC
DDERR_INVALIDOBJECT DDERR_INVALIDPARAMS
DDERR_INVALIDRECT DDERR_NOBLTHW
DDERR_SURFACEBUSY DDERR_SURFACELOST
DDERR_UNSUPPORTED  

dwX

X-coordinate to blit to on the destination surface.

dwY

Y-coordinate to blit to on the destination surface.

lpDDSrcSurface

Address of the DirectDrawSurface structure that represents the DirectDrawSurface. This 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

Specifies the type of transfer.

DDBLTFAST_DESTCOLORKEY

A transparent blit that uses the destination's color key.

DDBLTFAST_NOCOLORKEY

A normal copy blit with no transparency.

DDBLTFAST_SRCCOLORKEY

A transparent blit that uses the source's color key.

DDBLTFAST_WAIT

Postpones the DDERR_WASSTILLDRAWING message if the blitter is busy. Returns as soon as the blit can be set up or another error occurs.

This method only works on display memory surfaces and cannot clip when blitting. The software implementation of IDirectDrawSurface::BltFast is 10 percent faster than the IDirectDrawSurface::Blt method. However, there is no speed difference between the two if display hardware is being used.

Typically, IDirectDrawSurface::BltFast returns immediately with an error if the blitter is busy and the blit cannot be set up. The DDBLTFAST_WAIT flag can be used to alter this behavior so that this method will not return until either the blit can be set up or another error occurs.