CopyRectangle

Copies a rectangular area from a source image to a destination image. Block compression (BC) formats are not supported.

Syntax

HRESULT CopyRectangle(
         const Image &srcImage,
         const Rect &srcRect,
         const Image &dstImage,
         DWORD filter,
         size_t xOffset,
         size_t yOffset
)  

Parameters

srcImage
Type: Image 

[in] The source image, as a pointer to an Image structure.

srcRect
Type: Rect 

[in] Pointer to a Rect structure.

dstImage
Type: Image 

[in] The destination image, as a pointer to an Image structure.

filter
Type: DWORD 

[in] One or more flags from the TEX_FILTER_FLAGS enumeration.

xOffset
Type: size_t 

[in] X offset into the destination image.

yOffset
Type: size_t 

[in] Y offset into the destination image.

Return value

Type: HRESULT 

Success or error code.

Requirements

Header: Declared in directxtex.h.