Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATImage::CopyImage
CATResult CATImage::CopyImage ( const CATImage srcImg,
CATImage *&  dstImg,
CATInt32  xOffset,
CATInt32  yOffset,
CATInt32  width,
CATInt32  height 
) [static]

CopyImage() creates a new image of the same type as srcImg and stores it in dstImg. The data from srcImg is copied into a buffer owned by dstImg.

Caller must call CATImage::ReleaseImage() on the returned image when done.

This version allows you to specify offsets, width, and height of the data to copy into a new image.

Parameters:
srcImg - source image to copy from
dstImg - uninitialized image ptr. Contains copy of srcImg on return.
xOffset - relative x offset for top-left of copy.
yOffset - relative y offset for top-left of copy.
width - width of destination image.
height - height of destination image.
Returns:
CATResult result code
See also:
CATImage::ReleaseImage()

Definition at line 234 of file CATImage.cpp.

References AbsWidth(), CAT_ERR_IMAGE_INVALID_SUB_POSITION, CAT_ERR_IMAGE_NULL, CAT_SUCCESS, CATASSERT, CATFAILED, CATRESULT, CreateImage(), fData, fHeight, fWidth, kBytesPerPixel, XOffsetAbs(), and YOffsetAbs().


Generated on Mon Feb 11 04:10:33 2008 for Game Accessibility Suite by doxygen 1.5.4