IDirectDrawSurface7::BltFast method

Performs a source copy bitblt or transparent bitblt by using a source color key or destination color key.

Syntax


HRESULT BltFast(
  [in]  DWORD dwX,
  [in]  DWORD dwY,
  [in]  LPDIRECTDRAWSURFACE7 lpDDSrcSurface,
  [in]  LPRECT lpSrcRect,
  [in]  DWORD dwFlags,
  [in]  LPDDBLTFX lpDDBltFx
);

Parameters

dwX [in]

The x-coordinate to bitblt to on the destination surface.

dwY [in]

The y-coordinate to bitblt to on the destination surface.

lpDDSrcSurface [in]

A pointer to the IDirectDrawSurface7 interface for the DirectDrawSurface object that is the source of the bitblt.

lpSrcRect [in]

A pointer to a RECT structure that defines the upper-left and lower-right points of the rectangle to bitblt from on the source surface.

dwFlags [in]

Type of transfer. The following transfers are defined:

DDBLTFAST_DESTCOLORKEY

A transparent bitblt that uses the destination color key.

DDBLTFAST_NOCOLORKEY

A normal copy bitblt with no transparency.

DDBLTFAST_SRCCOLORKEY

A transparent bitblt that uses the source color key.

DDBLTFAST_WAIT

Postpones the DDERR_WASSTILLDRAWING message if the bitbltter is busy, and returns as soon as the bitblt can be set up or another error occurs.

lpDDBltFx [in]

A pointer to the DDBLTFX structure for the bitblt.

Return value

If the method succeeds, the return value is DD_OK.

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

  • DDERR_EXCEPTION
  • DDERR_GENERIC
  • DDERR_INVALIDOBJECT
  • DDERR_INVALIDPARAMS
  • DDERR_INVALIDRECT
  • DDERR_NOBLTHW
  • DDERR_SURFACEBUSY
  • DDERR_SURFACELOST
  • DDERR_UNSUPPORTED
  • DDERR_WASSTILLDRAWING

Remarks

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

BltFast works only on display memory surfaces and cannot clip when it performs a bitblt operation. 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 IDirectDrawSurface7::BltFast is 10 percent faster than the IDirectDrawSurface7::Blt method. However, there is no speed difference between the two if display hardware is used.

Typically, IDirectDrawSurface7::BltFast returns immediately with an error if the bitbltter is busy and the bitblt cannot be set up. You can use the DDBLTFAST_WAIT flag, however, if you want this method not to return until either the bitblt can be set up or another error occurs.

You must use LoadLibrary to explicitly link to Ddraw.dll and then use GetProcAddress to access the BltFast method.

Requirements

Header

Ddraw.h

Library

Ddraw.dll

See also

IDirectDrawSurface7

 

 

Community Additions

ADD
Show:
© 2014 Microsoft