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

SetPixel() sets 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 - red value of the pixel
g - green value of the pixel
b - blue value of the pixel
a - alpha value of the pixel (255 = opaque, 0 = transparent)
Returns:
CATResult result code. CAT_SUCCESS on success.
See also:
GetPixel()

Definition at line 886 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 SetPixel().


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