World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Файл SDL_pixels.h

См. исходные тексты.

Классы

struct  SDL_Color
 
struct  SDL_Palette
 
struct  SDL_PixelFormat
 

Transparency definitions

These define alpha as the opacity of a surface.

enum  SDL_PixelType {
  SDL_PIXELTYPE_UNKNOWN, SDL_PIXELTYPE_INDEX1, SDL_PIXELTYPE_INDEX4, SDL_PIXELTYPE_INDEX8,
  SDL_PIXELTYPE_PACKED8, SDL_PIXELTYPE_PACKED16, SDL_PIXELTYPE_PACKED32, SDL_PIXELTYPE_ARRAYU8,
  SDL_PIXELTYPE_ARRAYU16, SDL_PIXELTYPE_ARRAYU32, SDL_PIXELTYPE_ARRAYF16, SDL_PIXELTYPE_ARRAYF32
}
 
enum  SDL_BitmapOrder { SDL_BITMAPORDER_NONE, SDL_BITMAPORDER_4321, SDL_BITMAPORDER_1234 }
 
enum  SDL_PackedOrder {
  SDL_PACKEDORDER_NONE, SDL_PACKEDORDER_XRGB, SDL_PACKEDORDER_RGBX, SDL_PACKEDORDER_ARGB,
  SDL_PACKEDORDER_RGBA, SDL_PACKEDORDER_XBGR, SDL_PACKEDORDER_BGRX, SDL_PACKEDORDER_ABGR,
  SDL_PACKEDORDER_BGRA
}
 
enum  SDL_ArrayOrder {
  SDL_ARRAYORDER_NONE, SDL_ARRAYORDER_RGB, SDL_ARRAYORDER_RGBA, SDL_ARRAYORDER_ARGB,
  SDL_ARRAYORDER_BGR, SDL_ARRAYORDER_BGRA, SDL_ARRAYORDER_ABGR
}
 
enum  SDL_PackedLayout {
  SDL_PACKEDLAYOUT_NONE, SDL_PACKEDLAYOUT_332, SDL_PACKEDLAYOUT_4444, SDL_PACKEDLAYOUT_1555,
  SDL_PACKEDLAYOUT_5551, SDL_PACKEDLAYOUT_565, SDL_PACKEDLAYOUT_8888, SDL_PACKEDLAYOUT_2101010,
  SDL_PACKEDLAYOUT_1010102
}
 
enum  SDL_PixelFormatEnum {
  SDL_PIXELFORMAT_UNKNOWN, SDL_PIXELFORMAT_INDEX1LSB, SDL_PIXELFORMAT_INDEX1MSB, SDL_PIXELFORMAT_INDEX4LSB,
  SDL_PIXELFORMAT_INDEX4MSB, SDL_PIXELFORMAT_INDEX8, SDL_PIXELFORMAT_RGB332, SDL_PIXELFORMAT_RGB444,
  SDL_PIXELFORMAT_BGR444, SDL_PIXELFORMAT_RGB555, SDL_PIXELFORMAT_BGR555, SDL_PIXELFORMAT_ARGB4444,
  SDL_PIXELFORMAT_RGBA4444, SDL_PIXELFORMAT_ABGR4444, SDL_PIXELFORMAT_BGRA4444, SDL_PIXELFORMAT_ARGB1555,
  SDL_PIXELFORMAT_RGBA5551, SDL_PIXELFORMAT_ABGR1555, SDL_PIXELFORMAT_BGRA5551, SDL_PIXELFORMAT_RGB565,
  SDL_PIXELFORMAT_BGR565, SDL_PIXELFORMAT_RGB24, SDL_PIXELFORMAT_BGR24, SDL_PIXELFORMAT_RGB888,
  SDL_PIXELFORMAT_RGBX8888, SDL_PIXELFORMAT_BGR888, SDL_PIXELFORMAT_BGRX8888, SDL_PIXELFORMAT_ARGB8888,
  SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ARGB2101010,
  SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
  SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888, SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888, SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888, SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
  SDL_PIXELFORMAT_YV12, SDL_PIXELFORMAT_IYUV, SDL_PIXELFORMAT_YUY2, SDL_PIXELFORMAT_UYVY,
  SDL_PIXELFORMAT_YVYU, SDL_PIXELFORMAT_NV12, SDL_PIXELFORMAT_NV21, SDL_PIXELFORMAT_EXTERNAL_OES
}
 
typedef struct SDL_Color SDL_Color
 
typedef struct SDL_Palette SDL_Palette
 
typedef struct SDL_PixelFormat SDL_PixelFormat
 
const DECLSPEC char *SDLCALL SDL_GetPixelFormatName (Uint32 format)
 Get the human readable name of a pixel format. Подробнее...
 
DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks (Uint32 format, int *bpp, Uint32 *Rmask, Uint32 *Gmask, Uint32 *Bmask, Uint32 *Amask)
 Convert one of the enumerated pixel formats to a bpp and RGBA masks. Подробнее...
 
DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum (int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
 Convert a bpp and RGBA masks to an enumerated pixel format. Подробнее...
 
DECLSPEC SDL_PixelFormat *SDLCALL SDL_AllocFormat (Uint32 pixel_format)
 Create an SDL_PixelFormat structure from a pixel format enum. Подробнее...
 
DECLSPEC void SDLCALL SDL_FreeFormat (SDL_PixelFormat *format)
 Free an SDL_PixelFormat structure. Подробнее...
 
DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette (int ncolors)
 Create a palette structure with the specified number of color entries. Подробнее...
 
DECLSPEC int SDLCALL SDL_SetPixelFormatPalette (SDL_PixelFormat *format, SDL_Palette *palette)
 Set the palette for a pixel format structure. Подробнее...
 
DECLSPEC int SDLCALL SDL_SetPaletteColors (SDL_Palette *palette, const SDL_Color *colors, int firstcolor, int ncolors)
 Set a range of colors in a palette. Подробнее...
 
DECLSPEC void SDLCALL SDL_FreePalette (SDL_Palette *palette)
 Free a palette created with SDL_AllocPalette(). Подробнее...
 
DECLSPEC Uint32 SDLCALL SDL_MapRGB (const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b)
 Maps an RGB triple to an opaque pixel value for a given pixel format. Подробнее...
 
DECLSPEC Uint32 SDLCALL SDL_MapRGBA (const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Maps an RGBA quadruple to a pixel value for a given pixel format. Подробнее...
 
DECLSPEC void SDLCALL SDL_GetRGB (Uint32 pixel, const SDL_PixelFormat *format, Uint8 *r, Uint8 *g, Uint8 *b)
 Get the RGB components from a pixel of the specified format. Подробнее...
 
DECLSPEC void SDLCALL SDL_GetRGBA (Uint32 pixel, const SDL_PixelFormat *format, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)
 Get the RGBA components from a pixel of the specified format. Подробнее...
 
DECLSPEC void SDLCALL SDL_CalculateGammaRamp (float gamma, Uint16 *ramp)
 Calculate a 256 entry gamma ramp for a gamma value. Подробнее...
 

Подробное описание

Header for the enumerated pixel format definitions.

См. определение в файле SDL_pixels.h

Типы

◆ SDL_Color

typedef struct SDL_Color SDL_Color

◆ SDL_Palette

typedef struct SDL_Palette SDL_Palette

◆ SDL_PixelFormat

Заметки
Everything in the pixel format structure is read-only.

Перечисления

◆ SDL_PixelType

Pixel type.

Элементы перечислений
SDL_PIXELTYPE_UNKNOWN 
SDL_PIXELTYPE_INDEX1 
SDL_PIXELTYPE_INDEX4 
SDL_PIXELTYPE_INDEX8 
SDL_PIXELTYPE_PACKED8 
SDL_PIXELTYPE_PACKED16 
SDL_PIXELTYPE_PACKED32 
SDL_PIXELTYPE_ARRAYU8 
SDL_PIXELTYPE_ARRAYU16 
SDL_PIXELTYPE_ARRAYU32 
SDL_PIXELTYPE_ARRAYF16 
SDL_PIXELTYPE_ARRAYF32 

См. определение в файле SDL_pixels.h строка 51

◆ SDL_BitmapOrder

Bitmap pixel order, high bit -> low bit.

Элементы перечислений
SDL_BITMAPORDER_NONE 
SDL_BITMAPORDER_4321 
SDL_BITMAPORDER_1234 

См. определение в файле SDL_pixels.h строка 68

◆ SDL_PackedOrder

Packed component order, high bit -> low bit.

Элементы перечислений
SDL_PACKEDORDER_NONE 
SDL_PACKEDORDER_XRGB 
SDL_PACKEDORDER_RGBX 
SDL_PACKEDORDER_ARGB 
SDL_PACKEDORDER_RGBA 
SDL_PACKEDORDER_XBGR 
SDL_PACKEDORDER_BGRX 
SDL_PACKEDORDER_ABGR 
SDL_PACKEDORDER_BGRA 

См. определение в файле SDL_pixels.h строка 76

◆ SDL_ArrayOrder

Array component order, low byte -> high byte.

Элементы перечислений
SDL_ARRAYORDER_NONE 
SDL_ARRAYORDER_RGB 
SDL_ARRAYORDER_RGBA 
SDL_ARRAYORDER_ARGB 
SDL_ARRAYORDER_BGR 
SDL_ARRAYORDER_BGRA 
SDL_ARRAYORDER_ABGR 

См. определение в файле SDL_pixels.h строка 92

◆ SDL_PackedLayout

Packed component layout.

Элементы перечислений
SDL_PACKEDLAYOUT_NONE 
SDL_PACKEDLAYOUT_332 
SDL_PACKEDLAYOUT_4444 
SDL_PACKEDLAYOUT_1555 
SDL_PACKEDLAYOUT_5551 
SDL_PACKEDLAYOUT_565 
SDL_PACKEDLAYOUT_8888 
SDL_PACKEDLAYOUT_2101010 
SDL_PACKEDLAYOUT_1010102 

См. определение в файле SDL_pixels.h строка 104

◆ SDL_PixelFormatEnum

Элементы перечислений
SDL_PIXELFORMAT_UNKNOWN 
SDL_PIXELFORMAT_INDEX1LSB 
SDL_PIXELFORMAT_INDEX1MSB 
SDL_PIXELFORMAT_INDEX4LSB 
SDL_PIXELFORMAT_INDEX4MSB 
SDL_PIXELFORMAT_INDEX8 
SDL_PIXELFORMAT_RGB332 
SDL_PIXELFORMAT_RGB444 
SDL_PIXELFORMAT_BGR444 
SDL_PIXELFORMAT_RGB555 
SDL_PIXELFORMAT_BGR555 
SDL_PIXELFORMAT_ARGB4444 
SDL_PIXELFORMAT_RGBA4444 
SDL_PIXELFORMAT_ABGR4444 
SDL_PIXELFORMAT_BGRA4444 
SDL_PIXELFORMAT_ARGB1555 
SDL_PIXELFORMAT_RGBA5551 
SDL_PIXELFORMAT_ABGR1555 
SDL_PIXELFORMAT_BGRA5551 
SDL_PIXELFORMAT_RGB565 
SDL_PIXELFORMAT_BGR565 
SDL_PIXELFORMAT_RGB24 
SDL_PIXELFORMAT_BGR24 
SDL_PIXELFORMAT_RGB888 
SDL_PIXELFORMAT_RGBX8888 
SDL_PIXELFORMAT_BGR888 
SDL_PIXELFORMAT_BGRX8888 
SDL_PIXELFORMAT_ARGB8888 
SDL_PIXELFORMAT_RGBA8888 
SDL_PIXELFORMAT_ABGR8888 
SDL_PIXELFORMAT_BGRA8888 
SDL_PIXELFORMAT_ARGB2101010 
SDL_PIXELFORMAT_RGBA32 
SDL_PIXELFORMAT_ARGB32 
SDL_PIXELFORMAT_BGRA32 
SDL_PIXELFORMAT_ABGR32 
SDL_PIXELFORMAT_RGBA32 
SDL_PIXELFORMAT_ARGB32 
SDL_PIXELFORMAT_BGRA32 
SDL_PIXELFORMAT_ABGR32 
SDL_PIXELFORMAT_YV12 

Planar mode: Y + V + U (3 planes)

SDL_PIXELFORMAT_IYUV 

Planar mode: Y + U + V (3 planes)

SDL_PIXELFORMAT_YUY2 

Packed mode: Y0+U0+Y1+V0 (1 plane)

SDL_PIXELFORMAT_UYVY 

Packed mode: U0+Y0+V0+Y1 (1 plane)

SDL_PIXELFORMAT_YVYU 

Packed mode: Y0+V0+Y1+U0 (1 plane)

SDL_PIXELFORMAT_NV12 

Planar mode: Y + U/V interleaved (2 planes)

SDL_PIXELFORMAT_NV21 

Planar mode: Y + V/U interleaved (2 planes)

SDL_PIXELFORMAT_EXTERNAL_OES 

Android video texture format

См. определение в файле SDL_pixels.h строка 171

172 {
175  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_4321, 0,
176  1, 0),
178  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0,
179  1, 0),
181  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0,
182  4, 0),
184  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_1234, 0,
185  4, 0),
187  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0, 8, 1),
189  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB,
190  SDL_PACKEDLAYOUT_332, 8, 1),
192  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
193  SDL_PACKEDLAYOUT_4444, 12, 2),
195  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
196  SDL_PACKEDLAYOUT_4444, 12, 2),
198  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
199  SDL_PACKEDLAYOUT_1555, 15, 2),
201  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
202  SDL_PACKEDLAYOUT_1555, 15, 2),
204  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
205  SDL_PACKEDLAYOUT_4444, 16, 2),
207  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
208  SDL_PACKEDLAYOUT_4444, 16, 2),
210  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
211  SDL_PACKEDLAYOUT_4444, 16, 2),
213  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
214  SDL_PACKEDLAYOUT_4444, 16, 2),
216  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
217  SDL_PACKEDLAYOUT_1555, 16, 2),
219  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,
220  SDL_PACKEDLAYOUT_5551, 16, 2),
222  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,
223  SDL_PACKEDLAYOUT_1555, 16, 2),
225  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,
226  SDL_PACKEDLAYOUT_5551, 16, 2),
228  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
229  SDL_PACKEDLAYOUT_565, 16, 2),
231  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
232  SDL_PACKEDLAYOUT_565, 16, 2),
234  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_RGB, 0,
235  24, 3),
237  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0,
238  24, 3),
240  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB,
241  SDL_PACKEDLAYOUT_8888, 24, 4),
243  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX,
244  SDL_PACKEDLAYOUT_8888, 24, 4),
246  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,
247  SDL_PACKEDLAYOUT_8888, 24, 4),
249  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX,
250  SDL_PACKEDLAYOUT_8888, 24, 4),
252  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
253  SDL_PACKEDLAYOUT_8888, 32, 4),
255  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA,
256  SDL_PACKEDLAYOUT_8888, 32, 4),
258  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR,
259  SDL_PACKEDLAYOUT_8888, 32, 4),
261  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRA,
262  SDL_PACKEDLAYOUT_8888, 32, 4),
264  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
265  SDL_PACKEDLAYOUT_2101010, 32, 4),
266 
267  /* Aliases for RGBA byte arrays of color data, for the current platform */
268 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
273 #else
278 #endif
279 
281  SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
283  SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),
285  SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),
287  SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
289  SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'),
291  SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),
293  SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
295  SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')

Функции

◆ SDL_GetPixelFormatName()

const DECLSPEC char* SDLCALL SDL_GetPixelFormatName ( Uint32  format)

Get the human readable name of a pixel format.

◆ SDL_PixelFormatEnumToMasks()

DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks ( Uint32  format,
int *  bpp,
Uint32 Rmask,
Uint32 Gmask,
Uint32 Bmask,
Uint32 Amask 
)

Convert one of the enumerated pixel formats to a bpp and RGBA masks.

Возвращает
SDL_TRUE, or SDL_FALSE if the conversion wasn't possible.
См. также
SDL_MasksToPixelFormatEnum()

◆ SDL_MasksToPixelFormatEnum()

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

Convert a bpp and RGBA masks to an enumerated pixel format.

Возвращает
The pixel format, or SDL_PIXELFORMAT_UNKNOWN if the conversion wasn't possible.
См. также
SDL_PixelFormatEnumToMasks()

◆ SDL_AllocFormat()

DECLSPEC SDL_PixelFormat* SDLCALL SDL_AllocFormat ( Uint32  pixel_format)

Create an SDL_PixelFormat structure from a pixel format enum.

◆ SDL_FreeFormat()

DECLSPEC void SDLCALL SDL_FreeFormat ( SDL_PixelFormat format)

Free an SDL_PixelFormat structure.

◆ SDL_AllocPalette()

DECLSPEC SDL_Palette* SDLCALL SDL_AllocPalette ( int  ncolors)

Create a palette structure with the specified number of color entries.

Возвращает
A new palette, or NULL if there wasn't enough memory.
Заметки
The palette entries are initialized to white.
См. также
SDL_FreePalette()

◆ SDL_SetPixelFormatPalette()

DECLSPEC int SDLCALL SDL_SetPixelFormatPalette ( SDL_PixelFormat format,
SDL_Palette palette 
)

Set the palette for a pixel format structure.

◆ SDL_SetPaletteColors()

DECLSPEC int SDLCALL SDL_SetPaletteColors ( SDL_Palette palette,
const SDL_Color colors,
int  firstcolor,
int  ncolors 
)

Set a range of colors in a palette.

Аргументы
paletteThe palette to modify.
colorsAn array of colors to copy into the palette.
firstcolorThe index of the first palette entry to modify.
ncolorsThe number of entries to modify.
Возвращает
0 on success, or -1 if not all of the colors could be set.

◆ SDL_FreePalette()

DECLSPEC void SDLCALL SDL_FreePalette ( SDL_Palette palette)

Free a palette created with SDL_AllocPalette().

См. также
SDL_AllocPalette()

◆ SDL_MapRGB()

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

Maps an RGB triple to an opaque pixel value for a given pixel format.

См. также
SDL_MapRGBA

◆ SDL_MapRGBA()

DECLSPEC Uint32 SDLCALL SDL_MapRGBA ( const SDL_PixelFormat format,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Maps an RGBA quadruple to a pixel value for a given pixel format.

См. также
SDL_MapRGB

◆ SDL_GetRGB()

DECLSPEC void SDLCALL SDL_GetRGB ( Uint32  pixel,
const SDL_PixelFormat format,
Uint8 r,
Uint8 g,
Uint8 b 
)

Get the RGB components from a pixel of the specified format.

См. также
SDL_GetRGBA

◆ SDL_GetRGBA()

DECLSPEC void SDLCALL SDL_GetRGBA ( Uint32  pixel,
const SDL_PixelFormat format,
Uint8 r,
Uint8 g,
Uint8 b,
Uint8 a 
)

Get the RGBA components from a pixel of the specified format.

См. также
SDL_GetRGB

◆ SDL_CalculateGammaRamp()

DECLSPEC void SDLCALL SDL_CalculateGammaRamp ( float  gamma,
Uint16 ramp 
)

Calculate a 256 entry gamma ramp for a gamma value.

SDL_ARRAYORDER_BGRA
@ SDL_ARRAYORDER_BGRA
Definition: SDL_pixels.h:99
SDL_PIXELFORMAT_ARGB1555
@ SDL_PIXELFORMAT_ARGB1555
Definition: SDL_pixels.h:215
SDL_PIXELFORMAT_BGRA4444
@ SDL_PIXELFORMAT_BGRA4444
Definition: SDL_pixels.h:212
SDL_PACKEDORDER_NONE
@ SDL_PACKEDORDER_NONE
Definition: SDL_pixels.h:78
SDL_PACKEDLAYOUT_8888
@ SDL_PACKEDLAYOUT_8888
Definition: SDL_pixels.h:112
SDL_PIXELFORMAT_INDEX1LSB
@ SDL_PIXELFORMAT_INDEX1LSB
Definition: SDL_pixels.h:174
SDL_PIXELFORMAT_BGRA32
@ SDL_PIXELFORMAT_BGRA32
Definition: SDL_pixels.h:271
SDL_PIXELFORMAT_RGB888
@ SDL_PIXELFORMAT_RGB888
Definition: SDL_pixels.h:239
SDL_ARRAYORDER_ABGR
@ SDL_ARRAYORDER_ABGR
Definition: SDL_pixels.h:100
SDL_PIXELTYPE_ARRAYF32
@ SDL_PIXELTYPE_ARRAYF32
Definition: SDL_pixels.h:64
SDL_PIXELFORMAT_NV21
@ SDL_PIXELFORMAT_NV21
Definition: SDL_pixels.h:292
SDL_PIXELFORMAT_UYVY
@ SDL_PIXELFORMAT_UYVY
Definition: SDL_pixels.h:286
SDL_PIXELFORMAT_RGBX8888
@ SDL_PIXELFORMAT_RGBX8888
Definition: SDL_pixels.h:242
SDL_PIXELFORMAT_ABGR32
@ SDL_PIXELFORMAT_ABGR32
Definition: SDL_pixels.h:272
SDL_PACKEDLAYOUT_NONE
@ SDL_PACKEDLAYOUT_NONE
Definition: SDL_pixels.h:106
SDL_PIXELTYPE_INDEX8
@ SDL_PIXELTYPE_INDEX8
Definition: SDL_pixels.h:56
SDL_PIXELFORMAT_YUY2
@ SDL_PIXELFORMAT_YUY2
Definition: SDL_pixels.h:284
SDL_BITMAPORDER_1234
@ SDL_BITMAPORDER_1234
Definition: SDL_pixels.h:72
SDL_PIXELFORMAT_BGR888
@ SDL_PIXELFORMAT_BGR888
Definition: SDL_pixels.h:245
SDL_PIXELTYPE_UNKNOWN
@ SDL_PIXELTYPE_UNKNOWN
Definition: SDL_pixels.h:53
SDL_PIXELTYPE_INDEX4
@ SDL_PIXELTYPE_INDEX4
Definition: SDL_pixels.h:55
SDL_PIXELFORMAT_BGR565
@ SDL_PIXELFORMAT_BGR565
Definition: SDL_pixels.h:230
SDL_PIXELFORMAT_EXTERNAL_OES
@ SDL_PIXELFORMAT_EXTERNAL_OES
Definition: SDL_pixels.h:294
SDL_PACKEDLAYOUT_565
@ SDL_PACKEDLAYOUT_565
Definition: SDL_pixels.h:111
SDL_PACKEDLAYOUT_4444
@ SDL_PACKEDLAYOUT_4444
Definition: SDL_pixels.h:108
SDL_PACKEDORDER_XRGB
@ SDL_PACKEDORDER_XRGB
Definition: SDL_pixels.h:79
SDL_ARRAYORDER_ARGB
@ SDL_ARRAYORDER_ARGB
Definition: SDL_pixels.h:97
SDL_PIXELTYPE_ARRAYU32
@ SDL_PIXELTYPE_ARRAYU32
Definition: SDL_pixels.h:62
SDL_PIXELFORMAT_RGB565
@ SDL_PIXELFORMAT_RGB565
Definition: SDL_pixels.h:227
SDL_PIXELFORMAT_BGRX8888
@ SDL_PIXELFORMAT_BGRX8888
Definition: SDL_pixels.h:248
SDL_PACKEDLAYOUT_1010102
@ SDL_PACKEDLAYOUT_1010102
Definition: SDL_pixels.h:114
SDL_PIXELFORMAT_IYUV
@ SDL_PIXELFORMAT_IYUV
Definition: SDL_pixels.h:282
SDL_BITMAPORDER_NONE
@ SDL_BITMAPORDER_NONE
Definition: SDL_pixels.h:70
SDL_PIXELFORMAT_RGB332
@ SDL_PIXELFORMAT_RGB332
Definition: SDL_pixels.h:188
SDL_PACKEDLAYOUT_5551
@ SDL_PACKEDLAYOUT_5551
Definition: SDL_pixels.h:110
SDL_PackedLayout
SDL_PackedLayout
Definition: SDL_pixels.h:104
SDL_PIXELTYPE_ARRAYU16
@ SDL_PIXELTYPE_ARRAYU16
Definition: SDL_pixels.h:61
SDL_PACKEDORDER_XBGR
@ SDL_PACKEDORDER_XBGR
Definition: SDL_pixels.h:83
SDL_PIXELFORMAT_BGR555
@ SDL_PIXELFORMAT_BGR555
Definition: SDL_pixels.h:200
SDL_PACKEDORDER_RGBX
@ SDL_PACKEDORDER_RGBX
Definition: SDL_pixels.h:80
SDL_PIXELTYPE_ARRAYU8
@ SDL_PIXELTYPE_ARRAYU8
Definition: SDL_pixels.h:60
SDL_PIXELFORMAT_YVYU
@ SDL_PIXELFORMAT_YVYU
Definition: SDL_pixels.h:288
SDL_PIXELTYPE_PACKED16
@ SDL_PIXELTYPE_PACKED16
Definition: SDL_pixels.h:58
SDL_PIXELFORMAT_ARGB4444
@ SDL_PIXELFORMAT_ARGB4444
Definition: SDL_pixels.h:203
SDL_PIXELTYPE_PACKED32
@ SDL_PIXELTYPE_PACKED32
Definition: SDL_pixels.h:59
SDL_ArrayOrder
SDL_ArrayOrder
Definition: SDL_pixels.h:92
SDL_PIXELFORMAT_RGBA5551
@ SDL_PIXELFORMAT_RGBA5551
Definition: SDL_pixels.h:218
SDL_BitmapOrder
SDL_BitmapOrder
Definition: SDL_pixels.h:68
SDL_PIXELFORMAT_RGB444
@ SDL_PIXELFORMAT_RGB444
Definition: SDL_pixels.h:191
SDL_PIXELFORMAT_BGR444
@ SDL_PIXELFORMAT_BGR444
Definition: SDL_pixels.h:194
SDL_PIXELFORMAT_ARGB2101010
@ SDL_PIXELFORMAT_ARGB2101010
Definition: SDL_pixels.h:263
SDL_PIXELFORMAT_ABGR1555
@ SDL_PIXELFORMAT_ABGR1555
Definition: SDL_pixels.h:221
SDL_PACKEDORDER_BGRX
@ SDL_PACKEDORDER_BGRX
Definition: SDL_pixels.h:84
SDL_PixelType
SDL_PixelType
Definition: SDL_pixels.h:51
SDL_ARRAYORDER_RGB
@ SDL_ARRAYORDER_RGB
Definition: SDL_pixels.h:95
SDL_PIXELFORMAT_ABGR4444
@ SDL_PIXELFORMAT_ABGR4444
Definition: SDL_pixels.h:209
SDL_PIXELFORMAT_ARGB8888
@ SDL_PIXELFORMAT_ARGB8888
Definition: SDL_pixels.h:251
SDL_PACKEDLAYOUT_332
@ SDL_PACKEDLAYOUT_332
Definition: SDL_pixels.h:107
SDL_PIXELFORMAT_RGBA4444
@ SDL_PIXELFORMAT_RGBA4444
Definition: SDL_pixels.h:206
SDL_ARRAYORDER_BGR
@ SDL_ARRAYORDER_BGR
Definition: SDL_pixels.h:98
SDL_PIXELFORMAT_RGBA32
@ SDL_PIXELFORMAT_RGBA32
Definition: SDL_pixels.h:269
SDL_PIXELFORMAT_INDEX1MSB
@ SDL_PIXELFORMAT_INDEX1MSB
Definition: SDL_pixels.h:177
SDL_PACKEDLAYOUT_1555
@ SDL_PACKEDLAYOUT_1555
Definition: SDL_pixels.h:109
SDL_PIXELFORMAT_RGB555
@ SDL_PIXELFORMAT_RGB555
Definition: SDL_pixels.h:197
SDL_PIXELTYPE_ARRAYF16
@ SDL_PIXELTYPE_ARRAYF16
Definition: SDL_pixels.h:63
SDL_PIXELFORMAT_INDEX4LSB
@ SDL_PIXELFORMAT_INDEX4LSB
Definition: SDL_pixels.h:180
SDL_PIXELFORMAT_RGBA8888
@ SDL_PIXELFORMAT_RGBA8888
Definition: SDL_pixels.h:254
SDL_PACKEDORDER_BGRA
@ SDL_PACKEDORDER_BGRA
Definition: SDL_pixels.h:86
SDL_PIXELFORMAT_RGB24
@ SDL_PIXELFORMAT_RGB24
Definition: SDL_pixels.h:233
SDL_PIXELFORMAT_NV12
@ SDL_PIXELFORMAT_NV12
Definition: SDL_pixels.h:290
SDL_PIXELFORMAT_UNKNOWN
@ SDL_PIXELFORMAT_UNKNOWN
Definition: SDL_pixels.h:173
SDL_PIXELFORMAT_BGRA5551
@ SDL_PIXELFORMAT_BGRA5551
Definition: SDL_pixels.h:224
SDL_PIXELTYPE_PACKED8
@ SDL_PIXELTYPE_PACKED8
Definition: SDL_pixels.h:57
SDL_PIXELTYPE_INDEX1
@ SDL_PIXELTYPE_INDEX1
Definition: SDL_pixels.h:54
SDL_PIXELFORMAT_BGRA8888
@ SDL_PIXELFORMAT_BGRA8888
Definition: SDL_pixels.h:260
SDL_PIXELFORMAT_BGR24
@ SDL_PIXELFORMAT_BGR24
Definition: SDL_pixels.h:236
SDL_PackedOrder
SDL_PackedOrder
Definition: SDL_pixels.h:76
SDL_PIXELFORMAT_INDEX4MSB
@ SDL_PIXELFORMAT_INDEX4MSB
Definition: SDL_pixels.h:183
SDL_PIXELFORMAT_INDEX8
@ SDL_PIXELFORMAT_INDEX8
Definition: SDL_pixels.h:186
SDL_ARRAYORDER_RGBA
@ SDL_ARRAYORDER_RGBA
Definition: SDL_pixels.h:96
SDL_PACKEDLAYOUT_2101010
@ SDL_PACKEDLAYOUT_2101010
Definition: SDL_pixels.h:113
SDL_BITMAPORDER_4321
@ SDL_BITMAPORDER_4321
Definition: SDL_pixels.h:71
SDL_PIXELFORMAT_ARGB32
@ SDL_PIXELFORMAT_ARGB32
Definition: SDL_pixels.h:270
SDL_PIXELFORMAT_YV12
@ SDL_PIXELFORMAT_YV12
Definition: SDL_pixels.h:280
SDL_PIXELFORMAT_ABGR8888
@ SDL_PIXELFORMAT_ABGR8888
Definition: SDL_pixels.h:257
SDL_PACKEDORDER_RGBA
@ SDL_PACKEDORDER_RGBA
Definition: SDL_pixels.h:82
SDL_PixelFormatEnum
SDL_PixelFormatEnum
Definition: SDL_pixels.h:171
SDL_PACKEDORDER_ABGR
@ SDL_PACKEDORDER_ABGR
Definition: SDL_pixels.h:85
SDL_PACKEDORDER_ARGB
@ SDL_PACKEDORDER_ARGB
Definition: SDL_pixels.h:81
SDL_ARRAYORDER_NONE
@ SDL_ARRAYORDER_NONE
Definition: SDL_pixels.h:94