A version of this page is also available for
This method copies rectangular subsets of pixels from one surface to another.
HRESULT CopyRects( IDirect3DMobileSurface* pSourceSurface, CONST RECT* pSourceRectsArray, UINT cRects, IDirect3DMobileSurface* pDestinationSurface, CONST POINT* pDestPointsArray );
[in] Pointer to an IDirect3DMobileSurface interface, which represents the source surface. This parameter must point to a different surface than pDestinationSurface.
[in] Pointer to an array of RECT structures, which represents the rectangles to be transferred. Each rectangle will be transferred to the destination surface, with its top-left pixel at the position identified by the corresponding element of pDestPointsArray. Specifying NULL for this parameter causes the entire surface to be copied.
[in] Number of RECT structures contained in pSourceRectsArray.
[in] Pointer to an IDirect3DMobileSurface interface, which represents the destination surface. This parameter must point to a different surface than pSourceSurface.
[in] Pointer to an array of POINT structures, which identifies the top-left pixel position of each rectangle contained in pSourceRectsArray. If this parameter is NULL, the RECTs are copied to the same offset (same top/left location) as the source rectangle.
If the method succeeds, the return value is D3DM_OK (see D3DM Values).
If the method fails, the return value can be one of the following D3DMERR Values.
This method does not support stretch, color key, alpha blend, format conversion, or clipping of either source or destination rectangles. Note that this method will fail unless all the source rectangles and their corresponding destination rectangles are completely contained within the source and destination surfaces respectively. The format of the two surfaces must match, but they can have different dimensions.
This method cannot be applied to surfaces whose formats are classified as depth stencil formats.
|Windows Embedded CE||Windows CE 5.0 and later|
|Windows Mobile||Windows Mobile Version 5.0 and later|