HRESULT Blt(LPRECT lpDestRect,
LPDIRECTDRAWSURFACE lpDDSrcSurface,LPRECT lpSrcRect,
DWORD dwFlags, LPDDBLTFX lpDDBltFx);
Performs a bit block transfer.
·Returns DD_OK if successful, or one of the following error values otherwise:
DDERR_GENERIC DDERR_INVALIDCLIPLIST
DDERR_INVALIDOBJECT DDERR_INVALIDPARAMS
DDERR_INVALIDRECT DDERR_NOALPHAHW
DDERR_NOBLTHW DDERR_NOCLIPLIST
DDERR_NODDROPSHW DDERR_NOMIRRORHW
DDERR_NORASTEROPHW DDERR_NOROTATIONHW
DDERR_NOSTRETCHHW DDERR_NOZBUFFERHW
DDERR_SURFACEBUSY DDERR_SURFACELOST
lpDestRect
Address of a RECT structure that defines the upper left and lower right points of the rectangle on the destination surface to be blitted to.
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.
dwFlags
Uses either the alpha information in pixel format or the alpha channel surface attached to the destination surface as the alpha channel for this blit.
Uses the dwAlphaDestConst member in the DDBLTFX structure as the alpha channel for the destination surface for this blit.
The NEG suffix indicates that the destination surface becomes more transparent as the alpha value increases (0 is opaque).
DDBLT_ALPHADESTSURFACEOVERRIDE
Uses the lpDDSAlphaDest member in the DDBLTFX structure as the alpha channel for the destination for this blit.
Uses the dwAlphaEdgeBlend member in the DDBLTFX structure as the alpha channel for the edges of the image that border the color key colors.
Uses either the alpha information in pixel format or the alpha channel surface attached to the source surface as the alpha channel for this blit.
Uses the dwAlphaSrcConst member in the DDBLTFX structure as the alpha channel for the source for this blit.
The NEG suffix indicates that the source surface becomes more transparent as the alpha value increases (0 is opaque).
Uses the lpDDSAlphaSrc member in the DDBLTFX structure as the alpha channel for the source for this blit.
Performs this blit asynchronously through the FIFO in the order received. If no room is available in the FIFO hardware, fail the call.
Uses the dwFillColor member in the DDBLTFX structure as the RGB color that fills the destination rectangle on the destination surface.
Uses the dwDDFX member in the DDBLTFX structure to specify the effects to use for the blit.
Uses the dwDDROPS member in the DDBLTFX structure to specify the raster operations that are not part of the Win32 API.
Uses the dwFillDepth member in the DDBLTFX structure as the depth value with which to fill the destination rectangle on the destination z-buffer surface.
Uses the color key associated with the destination surface.
Uses the dckDestColorkey member in the DDBLTFX structure as the color key for the destination surface.
Uses the color key associated with the source surface.
Uses the dckSrcColorkey member in the DDBLTFX structure as the color key for the source surface.
Uses the dwROP member in the DDBLTFX structure for the raster operation for this blit. These ROPs are the same as those defined in the Win32 API.
Uses the dwRotationAngle member in the DDBLTFX structure as the angle (specified in 1/100th of a degree) to rotate the surface.
Postpones the DDERR_WASSTILLDRAWING return value if the blitter is busy. Returns as soon as the blit can be set up or another error occurs.
Performs a z-buffered blit using the z-buffers attached to the source and destination surfaces and the dwZBufferOpCode member in the DDBLTFX structure as the z-buffer opcode.
DDBLT_ZBUFFERDESTCONSTOVERRIDE
Performs a z-buffered blit using the dwZDestConst and dwZBufferOpCode members in the DDBLTFX structure as the z-buffer and z-buffer opcode, respectively, for the destination.
Performs a z-buffered blit using the lpDDSZBuffeDestr and dwZBufferOpCode members in the DDBLTFX structure as the z-buffer and z-buffer opcode, respectively, for the destination.
Performs a z-buffered blit using the dwZSrcConst and dwZBufferOpCode members in the DDBLTFX structure as the z-buffer and z-buffer opcode, respectively, for the source.
Performs a z-buffered blit using the lpDDSZBufferSrc and dwZBufferOpCode members in the DDBLTFX structure as the z-buffer and z-buffer opcode, respectively, for the source.
lpDDBltFx
See the DDBLTFX structure.
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 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, IDirectDrawSurface::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.