docs/man3/SDL_MapRGBA.3
changeset 0 74212992fb08
child 55 55f1f1b3e27d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docs/man3/SDL_MapRGBA.3	Thu Apr 26 16:45:43 2001 +0000
     1.3 @@ -0,0 +1,22 @@
     1.4 +.TH "SDL_MapRGBA" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" 
     1.5 +.SH "NAME"
     1.6 +SDL_MapRGBA\- Map a RGBA color value to a pixel format\&.
     1.7 +.SH "SYNOPSIS"
     1.8 +.PP
     1.9 +\fB#include "SDL\&.h"
    1.10 +.sp
    1.11 +\fBUint32 \fBSDL_MapRGBA\fP\fR(\fBSDL_PixelFormat *fmt, Uint8 r, Uint8 g, Uint8 b, Uint8 a\fR);
    1.12 +.SH "DESCRIPTION"
    1.13 +.PP
    1.14 +Maps the RGBA color value to the specified pixel format and returns the pixel value as a 32-bit int\&.
    1.15 +.PP
    1.16 +If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned\&.
    1.17 +.PP
    1.18 +If the specified pixel format has no alpha component the alpha value will be ignored (as it will be in formats with a palette)\&.
    1.19 +.SH "RETURN VALUE"
    1.20 +.PP
    1.21 +A pixel value best approximating the given RGBA color value for a given pixel format\&. If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e\&.g\&., with a 16-bpp format the return value can be assigned to a \fBUint16\fP, and similarly a \fBUint8\fP for an 8-bpp format)\&.
    1.22 +.SH "SEE ALSO"
    1.23 +.PP
    1.24 +\fISDL_GetRGB\fR, \fISDL_GetRGBA\fR, \fISDL_MapRGB\fR, \fISDL_PixelFormat\fR
    1.25 +...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04