Microsoft SDK for Java

blt

This method of the DirectDrawSurface Class performs a bit block transfer.

Syntax

public int blt(Rect dest, DirectDrawSurface ddS, Rect src, int flags);

Return Value

Returns S_OK or 0 if the blit was set successfully; otherwise, returns an HRESULT error code. Use the DDBLT_WAIT flag to modify the return behavior as previously discussed.

Parameters

dest A Rect object that defines the upper-left and lower-right points of the rectangle on the destination surface to be blitted to.
ddS The DirectDrawSurface object that is the source for the blit operation.
src A Rect object that defines the upper-left and lower-right points of the rectangle on the source surface to be blitted from.
flags One or more of these values:

DDCOOPERATIVE_CLIPTOCOMPONENT or
DDCOOPERATIVE_OFFSETTOCOMPONENT
DDBLT_ALPHADEST
DDBLT_ASYNC
DDBLT_ALPHADESTNEG
DDBLT_KEYDEST
DDBLT_ALPHASRC
DDBLT_KEYSRC
DDBLT_ALPHASRCNEG
DDBLT_WAIT


Remarks

This method is capable of synchronous or asynchronous blits, 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 z-information, alpha information, 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, blt returns immediately with an error if the blitter is busy and the blit could not be set up. The DDBLT_WAIT flag can alter this behavior so that the method will either wait until the blit can be set up or another error occurs before it returns.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.