Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2009-11-18 21:02:27
Size: 904
Editor: SheenaSmith
Comment: create page, add content
Revision 2 as of 2009-11-22 20:31:03
Size: 1080
Editor: SheenaSmith
Comment: content added
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
Use this function to convert a bpp and RGBA masks to an enumerated pixel format. Use this function to convert a bpp value and RGBA masks to an enumerated pixel format.
Line 19: Line 19:
||'''bpp'''||||
||'''Rmask'''||||
||'''Gmask'''||||
||'''Bmask'''||||
||'''Amask'''||||
||'''bpp'''||a bits per pixel value; usually 15, 16, or 32||
||'''Rmask'''||the mask for the red component of the pixel||
||'''Gmask'''||the mask for the green component of the pixel||
||'''Bmask'''||the mask for the blue component of the pixel||
||'''Amask'''||the mask for the alpha component of the pixel||
Line 26: Line 26:
The pixel format, or ::SDL_PIXELFORMAT_UNKNOWN if the conversion wasn't possible. The pixel format enumeration.

SDL_MasksToPixelFormatEnum

Use this function to convert a bpp value and RGBA masks to an enumerated pixel format.

Syntax

Uint32 SDL_MasksToPixelFormatEnum(int    bpp,
                                  Uint32 Rmask,
                                  Uint32 Gmask,
                                  Uint32 Bmask,
                                  Uint32 Amask)

Function Parameters

bpp

a bits per pixel value; usually 15, 16, or 32

Rmask

the mask for the red component of the pixel

Gmask

the mask for the green component of the pixel

Bmask

the mask for the blue component of the pixel

Amask

the mask for the alpha component of the pixel

Return Value

The pixel format enumeration.

Code Examples

You can add your code example here

Remarks

You can add useful comments here

None: SDL_MasksToPixelFormatEnum (last edited 2011-03-26 00:23:25 by SheenaSmith)

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