Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATImage::GetPixel
CATResult CATImage::GetPixel ( CATInt32  x,
CATInt32  y,
unsigned char &  r,
unsigned char &  g,
unsigned char &  b,
unsigned char &  a 
) const

GetPixel() retrieves the red, green, blue, and alpha values for a specified pixel.

This is for convenience and prototyping - for high-speed image processing you'll need to work more directly with the image buffer.

Parameters:
x - x position within the image of the pixel
y - y position within the image of the pixel
r - receives the red value of the pixel
g - receives the green value of the pixel
b - receives the blue value of the pixel
a - receives the alpha values of the pixel
Returns:
CATResult result code. CAT_SUCCESS on success.
See also:
SetPixel()

Definition at line 813 of file CATImage.cpp.

References AbsWidth(), CAT_ERR_IMAGE_EMPTY, CAT_ERR_IMAGE_OUT_OF_RANGE, CAT_SUCCESS, CATASSERT, CATRESULT, fData, fHeight, fWidth, kBytesPerPixel, XOffsetAbs(), and YOffsetAbs().

Referenced by GetPixel().


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