SDL_GetRGBA

Name

SDL_GetRGBA -- Get RGBA values from a pixel in the specified pixel format.

Synopsis

uses
SDL;

procedure SDL_GetRGBA( pixel : UInt32; fmt : PSDL_PixelFormat; r : PUInt8; g :  PUint8; b : PUInt8; a : UInt8 );

Description

Get RGBA component values from a pixel stored in the specified pixel format.

This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [$ff, $ff, $ff] not [$f8, $fc, $f8]).

If the surface has no alpha component, the alpha will be returned as $ff (100% opaque).

See Also

SDL_GetRGB, SDL_MapRGB , SDL_MapRGBA, TSDL_PixelFormat