Size: 778
Comment: create page, add content
|
Size: 1105
Comment: add categories
|
Deletions are marked like this. | Additions are marked like this. |
Line 19: | Line 19: |
||'''format'''|||| ||'''r'''|||| ||'''g'''|||| ||'''b'''|||| ||'''a'''|||| |
||'''format'''||an [[SDL_PixelFormat]] structure describing the format of the pixel|| ||'''r'''||the red component of the pixel in the range 0-255|| ||'''g'''||the green component of the pixel in the range 0-255|| ||'''b'''||the blue component of the pixel in the range 0-255|| ||'''a'''||the alpha component of the pixel in the range 0-255|| |
Line 26: | Line 26: |
A pixel value. | |
Line 38: | Line 38: |
---- [[CategoryAPI]], [[CategoryPixels]] |
SDL_MapRGBA
Use this function to map an RGBA quadruple to a pixel value for a given pixel format.
Contents
Syntax
Uint32 SDL_MapRGBA(const SDL_PixelFormat* format,
Uint8 r,
Uint8 g,
Uint8 b,
Uint8 a)
Function Parameters
format |
an SDL_PixelFormat structure describing the format of the pixel |
r |
the red component of the pixel in the range 0-255 |
g |
the green component of the pixel in the range 0-255 |
b |
the blue component of the pixel in the range 0-255 |
a |
the alpha component of the pixel in the range 0-255 |
Return Value
A pixel value.
Code Examples
You can add your code example here
Remarks
You can add useful comments here