comparison include/SDL_pixels.h @ 2275:12ea0fdc0df2

Split out the SDL_rect and SDL_surface functions into their own headers. Removed unused count from the dirty rect list.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 10 Sep 2007 12:20:02 +0000
parents 340942cfda48
children 24a6b3588eac
comparison
equal deleted inserted replaced
2274:aedfcdeb69b6 2275:12ea0fdc0df2
34 #ifdef __cplusplus 34 #ifdef __cplusplus
35 /* *INDENT-OFF* */ 35 /* *INDENT-OFF* */
36 extern "C" { 36 extern "C" {
37 /* *INDENT-ON* */ 37 /* *INDENT-ON* */
38 #endif 38 #endif
39
40 /* Transparency definitions: These define alpha as the opacity of a surface */
41 #define SDL_ALPHA_OPAQUE 255
42 #define SDL_ALPHA_TRANSPARENT 0
39 43
40 enum 44 enum
41 { /* Pixel type */ 45 { /* Pixel type */
42 SDL_PIXELTYPE_UNKNOWN, 46 SDL_PIXELTYPE_UNKNOWN,
43 SDL_PIXELTYPE_INDEX1, 47 SDL_PIXELTYPE_INDEX1,
328 * 332 *
329 * \sa SDL_AllocPalette() 333 * \sa SDL_AllocPalette()
330 */ 334 */
331 extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette); 335 extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);
332 336
337 /**
338 * \fn Uint32 SDL_MapRGB(const SDL_PixelFormat *format,
339 * Uint8 r, Uint8 g, Uint8 b)
340 *
341 * \brief Maps an RGB triple to an opaque pixel value for a given pixel format
342 *
343 * \sa SDL_MapRGBA
344 */
345 extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format,
346 Uint8 r, Uint8 g, Uint8 b);
347
348 /**
349 * \fn Uint32 SDL_MapRGBA(const SDL_PixelFormat *fmt,
350 * Uint8 r, Uint8 g, Uint8 b, Uint8 a)
351 *
352 * \brief Maps an RGBA quadruple to a pixel value for a given pixel format
353 *
354 * \sa SDL_MapRGB
355 */
356 extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format,
357 Uint8 r, Uint8 g, Uint8 b,
358 Uint8 a);
359
360 /**
361 * \fn void SDL_GetRGB(Uint32 pixel, const SDL_PixelFormat * format,
362 * Uint8 * r, Uint8 * g, Uint8 * b)
363 *
364 * \brief Maps a pixel value into the RGB components for a given pixel format
365 *
366 * \sa SDL_GetRGBA
367 */
368 extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel,
369 const SDL_PixelFormat * format,
370 Uint8 * r, Uint8 * g, Uint8 * b);
371
372 /**
373 * \fn void SDL_GetRGBA(Uint32 pixel, const SDL_PixelFormat * format,
374 * Uint8 * r, Uint8 * g, Uint8 * b, Uint8 * a)
375 *
376 * \brief Maps a pixel value into the RGBA components for a given pixel format
377 *
378 * \sa SDL_GetRGB
379 */
380 extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel,
381 const SDL_PixelFormat * format,
382 Uint8 * r, Uint8 * g, Uint8 * b,
383 Uint8 * a);
384
333 /* Ends C function definitions when using C++ */ 385 /* Ends C function definitions when using C++ */
334 #ifdef __cplusplus 386 #ifdef __cplusplus
335 /* *INDENT-OFF* */ 387 /* *INDENT-OFF* */
336 } 388 }
337 /* *INDENT-ON* */ 389 /* *INDENT-ON* */