include/SDL_pixels.h
changeset 7191 75360622e65f
parent 7024 72cb3e205571
child 7677 871d43c6968a
     1.1 --- a/include/SDL_pixels.h	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/include/SDL_pixels.h	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -21,7 +21,7 @@
     1.4  
     1.5  /**
     1.6   *  \file SDL_pixels.h
     1.7 - *  
     1.8 + *
     1.9   *  Header for the enumerated pixel format definitions.
    1.10   */
    1.11  
    1.12 @@ -31,14 +31,12 @@
    1.13  #include "begin_code.h"
    1.14  /* Set up for C function definitions, even when using C++ */
    1.15  #ifdef __cplusplus
    1.16 -/* *INDENT-OFF* */
    1.17  extern "C" {
    1.18 -/* *INDENT-ON* */
    1.19  #endif
    1.20  
    1.21  /**
    1.22   *  \name Transparency definitions
    1.23 - *  
    1.24 + *
    1.25   *  These define alpha as the opacity of a surface.
    1.26   */
    1.27  /*@{*/
    1.28 @@ -117,11 +115,11 @@
    1.29      ((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \
    1.30       ((bits) << 8) | ((bytes) << 0))
    1.31  
    1.32 -#define SDL_PIXELFLAG(X)	(((X) >> 28) & 0x0F)
    1.33 -#define SDL_PIXELTYPE(X)	(((X) >> 24) & 0x0F)
    1.34 -#define SDL_PIXELORDER(X)	(((X) >> 20) & 0x0F)
    1.35 -#define SDL_PIXELLAYOUT(X)	(((X) >> 16) & 0x0F)
    1.36 -#define SDL_BITSPERPIXEL(X)	(((X) >> 8) & 0xFF)
    1.37 +#define SDL_PIXELFLAG(X)    (((X) >> 28) & 0x0F)
    1.38 +#define SDL_PIXELTYPE(X)    (((X) >> 24) & 0x0F)
    1.39 +#define SDL_PIXELORDER(X)   (((X) >> 20) & 0x0F)
    1.40 +#define SDL_PIXELLAYOUT(X)  (((X) >> 16) & 0x0F)
    1.41 +#define SDL_BITSPERPIXEL(X) (((X) >> 8) & 0xFF)
    1.42  #define SDL_BYTESPERPIXEL(X) \
    1.43      (SDL_ISPIXELFORMAT_FOURCC(X) ? \
    1.44          ((((X) == SDL_PIXELFORMAT_YUY2) || \
    1.45 @@ -301,9 +299,9 @@
    1.46  
    1.47  /**
    1.48   *  \brief Convert one of the enumerated pixel formats to a bpp and RGBA masks.
    1.49 - *  
    1.50 + *
    1.51   *  \return SDL_TRUE, or SDL_FALSE if the conversion wasn't possible.
    1.52 - *  
    1.53 + *
    1.54   *  \sa SDL_MasksToPixelFormatEnum()
    1.55   */
    1.56  extern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format,
    1.57 @@ -315,10 +313,10 @@
    1.58  
    1.59  /**
    1.60   *  \brief Convert a bpp and RGBA masks to an enumerated pixel format.
    1.61 - *  
    1.62 - *  \return The pixel format, or ::SDL_PIXELFORMAT_UNKNOWN if the conversion 
    1.63 + *
    1.64 + *  \return The pixel format, or ::SDL_PIXELFORMAT_UNKNOWN if the conversion
    1.65   *          wasn't possible.
    1.66 - *  
    1.67 + *
    1.68   *  \sa SDL_PixelFormatEnumToMasks()
    1.69   */
    1.70  extern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,
    1.71 @@ -338,13 +336,13 @@
    1.72  extern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format);
    1.73  
    1.74  /**
    1.75 - *  \brief Create a palette structure with the specified number of color 
    1.76 + *  \brief Create a palette structure with the specified number of color
    1.77   *         entries.
    1.78 - *  
    1.79 + *
    1.80   *  \return A new palette, or NULL if there wasn't enough memory.
    1.81 - *  
    1.82 + *
    1.83   *  \note The palette entries are initialized to white.
    1.84 - *  
    1.85 + *
    1.86   *  \sa SDL_FreePalette()
    1.87   */
    1.88  extern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);
    1.89 @@ -357,12 +355,12 @@
    1.90  
    1.91  /**
    1.92   *  \brief Set a range of colors in a palette.
    1.93 - *  
    1.94 + *
    1.95   *  \param palette    The palette to modify.
    1.96   *  \param colors     An array of colors to copy into the palette.
    1.97   *  \param firstcolor The index of the first palette entry to modify.
    1.98   *  \param ncolors    The number of entries to modify.
    1.99 - *  
   1.100 + *
   1.101   *  \return 0 on success, or -1 if not all of the colors could be set.
   1.102   */
   1.103  extern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,
   1.104 @@ -371,14 +369,14 @@
   1.105  
   1.106  /**
   1.107   *  \brief Free a palette created with SDL_AllocPalette().
   1.108 - *  
   1.109 + *
   1.110   *  \sa SDL_AllocPalette()
   1.111   */
   1.112  extern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);
   1.113  
   1.114  /**
   1.115   *  \brief Maps an RGB triple to an opaque pixel value for a given pixel format.
   1.116 - *  
   1.117 + *
   1.118   *  \sa SDL_MapRGBA
   1.119   */
   1.120  extern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format,
   1.121 @@ -386,7 +384,7 @@
   1.122  
   1.123  /**
   1.124   *  \brief Maps an RGBA quadruple to a pixel value for a given pixel format.
   1.125 - *  
   1.126 + *
   1.127   *  \sa SDL_MapRGB
   1.128   */
   1.129  extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format,
   1.130 @@ -395,7 +393,7 @@
   1.131  
   1.132  /**
   1.133   *  \brief Get the RGB components from a pixel of the specified format.
   1.134 - *  
   1.135 + *
   1.136   *  \sa SDL_GetRGBA
   1.137   */
   1.138  extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel,
   1.139 @@ -404,7 +402,7 @@
   1.140  
   1.141  /**
   1.142   *  \brief Get the RGBA components from a pixel of the specified format.
   1.143 - *  
   1.144 + *
   1.145   *  \sa SDL_GetRGB
   1.146   */
   1.147  extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel,
   1.148 @@ -420,9 +418,7 @@
   1.149  
   1.150  /* Ends C function definitions when using C++ */
   1.151  #ifdef __cplusplus
   1.152 -/* *INDENT-OFF* */
   1.153  }
   1.154 -/* *INDENT-ON* */
   1.155  #endif
   1.156  #include "close_code.h"
   1.157