Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2009-11-18 20:48:06
Size: 717
Editor: SheenaSmith
Comment: create page, add content
Revision 2 as of 2009-11-22 20:12:47
Size: 948
Editor: SheenaSmith
Comment: content added
Deletions are marked like this. Additions are marked like this.
Line 18: Line 18:
||'''format'''||||
||'''r'''||||
||'''g'''||||
||'''b'''||||
||'''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||
Line 24: Line 24:
A pixel value.

SDL_MapRGB

Use this function to map an RGB triple to an opaque pixel value for a given pixel format.

Syntax

Uint32 SDL_MapRGB(const SDL_PixelFormat* format,
                  Uint8                  r, 
                  Uint8                  g, 
                  Uint8                  b)

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

Return Value

A pixel value.

Code Examples

You can add your code example here

Remarks

You can add useful comments here

None: SDL_MapRGB (last edited 2010-09-26 17:12:51 by SheenaSmith)

Feedback
Please include your contact information if you'd like to receive a reply.
Submit