Platform SDK: DirectX

DirectDrawSurface7.BltFast

The DirectDrawSurface7.BltFast method performs a source copy blit or transparent blit by using a source color key or destination color key.

object.BltFast( _ 
    dx As Long, _ 
    dy As Long, _ 
    ddS As DirectDrawSurface7, _ 
    srcRect As RECT, _ 
    trans As CONST_DDBLTFASTFLAGS) As Long

Parameters

object
Object expression that resolves to a DirectDrawSurface7 object.
dx and dy
X- and y-coordinates to blit to on the destination surface.
ddS
DirectDrawSurface7 object for the DirectDrawSurface object that is the source of the blit.
srcRect
RECT type that defines the upper-left and lower-right points of the rectangle to blit from on the source surface.
trans
One of the constants from the CONST_DDBLTFASTFLAGS enumeration that identifies the type of transfer.

Error Codes

If the method fails, it can return one of the following:

DDERR_EXCEPTION
DDERR_GENERIC
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_INVALIDRECT
DDERR_NOBLTHW
DDERR_SURFACEBUSY
DDERR_SURFACELOST
DDERR_UNSUPPORTED
DDERR_WASSTILLDRAWING

Remarks

This method always attempts an asynchronous blit if it is supported by the hardware.

This method works only on display memory surfaces and cannot clip when blitting. If you use this method on a surface with an attached clipper, the call fails, and the method returns DDERR_UNSUPPORTED.

The software implementation of DirectDrawSurface7.BltFast is 10 percent faster than the DirectDrawSurface7.Blt method. However, there is no speed difference between the two if display hardware is being used.

Typically, DirectDrawSurface7.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 not to return until either the blit can be set up or another error occurs.

Because this method often generates an error, instead of setting an error in the error object, the method returns the error code.