Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATImage::CreateImage
CATResult CATImage::CreateImage ( CATImage *&  image,
CATInt32  width,
CATInt32  height,
bool  init = true,
bool  transparent = true 
) [static]

CreateImage() creates an image.

Use this instead of new to create image objects. If width and height are non-zero, creates the appropriate memory for the image and adds a reference. Otherwise, does not create memory buffer or add reference.

Call CATImage::ReleaseImage() on the returned image when done.

Parameters:
image - uninitialized image ptr. Set on return.
width - desired width of image in pixels.
height - desired height of image in pixels.
init - if true, image data is set to 0.
transparent - if false, sets all alpha channels to 255 (opaque). Otherwise, sets the alpha channels to 0 (transparent). Ignored if init == false.
Returns:
CATResult result code
See also:
CATImage::ReleaseImage()

Definition at line 39 of file CATImage.cpp.

References CAT_ERR_OUT_OF_MEMORY, CAT_SUCCESS, CATImage(), CATRESULT, and Create().

Referenced by CATControl::CheckImageSize(), CopyImage(), CreateSub(), and CATWindow::ResetBackground().


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