include/SDL_surface.h
changeset 4929 aa8888658021
parent 4424 274743af0430
child 4949 68da5a234bba
     1.1 --- a/include/SDL_surface.h	Thu Dec 02 11:56:23 2010 -0800
     1.2 +++ b/include/SDL_surface.h	Sun Dec 12 15:19:05 2010 -0800
     1.3 @@ -32,6 +32,8 @@
     1.4  #include "SDL_stdinc.h"
     1.5  #include "SDL_pixels.h"
     1.6  #include "SDL_rect.h"
     1.7 +#include "SDL_blendmode.h"
     1.8 +#include "SDL_scalemode.h"
     1.9  #include "SDL_rwops.h"
    1.10  
    1.11  #include "begin_code.h"
    1.12 @@ -88,7 +90,7 @@
    1.13      struct SDL_BlitMap *map;    /**< Private */
    1.14  
    1.15      /** format version, bumped at every change to invalidate blit maps */
    1.16 -    unsigned int format_version;        /**< Private */
    1.17 +    int format_version;         /**< Private */
    1.18  
    1.19      /** Reference count -- used when freeing surface */
    1.20      int refcount;               /**< Read-mostly */
    1.21 @@ -300,7 +302,7 @@
    1.22   *  \sa SDL_GetSurfaceBlendMode()
    1.23   */
    1.24  extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,
    1.25 -                                                    int blendMode);
    1.26 +                                                    SDL_BlendMode blendMode);
    1.27  
    1.28  /**
    1.29   *  \brief Get the blend mode used for blit operations.
    1.30 @@ -313,13 +315,13 @@
    1.31   *  \sa SDL_SetSurfaceBlendMode()
    1.32   */
    1.33  extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,
    1.34 -                                                    int *blendMode);
    1.35 +                                                    SDL_BlendMode *blendMode);
    1.36  
    1.37  /**
    1.38   *  \brief Set the scale mode used for blit operations.
    1.39   *  
    1.40   *  \param surface   The surface to update.
    1.41 - *  \param scaleMode ::SDL_TextureScaleMode to use for blit scaling.
    1.42 + *  \param scaleMode ::SDL_ScaleMode to use for blit scaling.
    1.43   *  
    1.44   *  \return 0 on success, or -1 if the surface is not valid or the scale mode is
    1.45   *          not supported.
    1.46 @@ -331,7 +333,7 @@
    1.47   *  \sa SDL_GetSurfaceScaleMode()
    1.48   */
    1.49  extern DECLSPEC int SDLCALL SDL_SetSurfaceScaleMode(SDL_Surface * surface,
    1.50 -                                                    int scaleMode);
    1.51 +                                                    SDL_ScaleMode scaleMode);
    1.52  
    1.53  /**
    1.54   *  \brief Get the scale mode used for blit operations.
    1.55 @@ -344,7 +346,7 @@
    1.56   *  \sa SDL_SetSurfaceScaleMode()
    1.57   */
    1.58  extern DECLSPEC int SDLCALL SDL_GetSurfaceScaleMode(SDL_Surface * surface,
    1.59 -                                                    int *scaleMode);
    1.60 +                                                    SDL_ScaleMode *scaleMode);
    1.61  
    1.62  /**
    1.63   *  Sets the clipping rectangle for the destination surface in a blit.
    1.64 @@ -413,10 +415,10 @@
    1.65   */
    1.66  extern DECLSPEC int SDLCALL SDL_BlendPoint
    1.67      (SDL_Surface * dst, int x, int y,
    1.68 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    1.69 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    1.70  extern DECLSPEC int SDLCALL SDL_BlendPoints
    1.71      (SDL_Surface * dst, const SDL_Point * points, int count,
    1.72 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    1.73 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    1.74  
    1.75  /**
    1.76   *  Draws a line with \c color.
    1.77 @@ -438,10 +440,10 @@
    1.78   */
    1.79  extern DECLSPEC int SDLCALL SDL_BlendLine
    1.80      (SDL_Surface * dst, int x1, int y1, int x2, int y2,
    1.81 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    1.82 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    1.83  extern DECLSPEC int SDLCALL SDL_BlendLines
    1.84      (SDL_Surface * dst, const SDL_Point * points, int count,
    1.85 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    1.86 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    1.87  
    1.88  /**
    1.89   *  Draws the given rectangle with \c color.
    1.90 @@ -467,10 +469,10 @@
    1.91   */
    1.92  extern DECLSPEC int SDLCALL SDL_BlendRect
    1.93      (SDL_Surface * dst, const SDL_Rect * rect,
    1.94 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    1.95 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    1.96  extern DECLSPEC int SDLCALL SDL_BlendRects
    1.97      (SDL_Surface * dst, const SDL_Rect ** rects, int count,
    1.98 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    1.99 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   1.100  
   1.101  /**
   1.102   *  Performs a fast fill of the given rectangle with \c color.
   1.103 @@ -496,92 +498,10 @@
   1.104   */
   1.105  extern DECLSPEC int SDLCALL SDL_BlendFillRect
   1.106      (SDL_Surface * dst, const SDL_Rect * rect,
   1.107 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   1.108 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   1.109  extern DECLSPEC int SDLCALL SDL_BlendFillRects
   1.110      (SDL_Surface * dst, const SDL_Rect ** rects, int count,
   1.111 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   1.112 -
   1.113 -#if 0
   1.114 -/**
   1.115 - *  Draws the given circle with \c color.
   1.116 - *  
   1.117 - *  The color should be a pixel of the format used by the surface, and 
   1.118 - *  can be generated by the SDL_MapRGB() function.
   1.119 - *  
   1.120 - *  \return 0 on success, or -1 on error.
   1.121 - */
   1.122 -extern DECLSPEC int SDLCALL SDL_DrawCircle
   1.123 -    (SDL_Surface * dst, int x, int y, int radius, Uint32 color);
   1.124 -
   1.125 -/**
   1.126 - *  Blends an RGBA value into the outline of the given circle.
   1.127 - *  
   1.128 - *  \return 0 on success, or -1 on error.
   1.129 - */
   1.130 -extern DECLSPEC int SDLCALL SDL_BlendCircle
   1.131 -    (SDL_Surface * dst, int x, int y, int radius,
   1.132 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   1.133 -
   1.134 -/**
   1.135 - *  Fills the given circle with \c color.
   1.136 - *  
   1.137 - *  The color should be a pixel of the format used by the surface, and 
   1.138 - *  can be generated by the SDL_MapRGB() function.
   1.139 - *  
   1.140 - *  \return 0 on success, or -1 on error.
   1.141 - */
   1.142 -extern DECLSPEC int SDLCALL SDL_FillCircle
   1.143 -    (SDL_Surface * dst, int x, int y, int radius, Uint32 color);
   1.144 -
   1.145 -/**
   1.146 - *  Blends an RGBA value into the given circle.
   1.147 - *  
   1.148 - *  \return This function returns 0 on success, or -1 on error.
   1.149 - */
   1.150 -extern DECLSPEC int SDLCALL SDL_BlendFillCircle
   1.151 -    (SDL_Surface * dst, int x, int y, int radius,
   1.152 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   1.153 -
   1.154 -/**
   1.155 - *  Draws the given ellipse with \c color.
   1.156 - *  
   1.157 - *  The color should be a pixel of the format used by the surface, and 
   1.158 - *  can be generated by the SDL_MapRGB() function.
   1.159 - *  
   1.160 - *  \return 0 on success, or -1 on error.
   1.161 - */
   1.162 -extern DECLSPEC int SDLCALL SDL_DrawEllipse
   1.163 -    (SDL_Surface * dst, int x, int y, int w, int h, Uint32 color);
   1.164 -
   1.165 -/**
   1.166 - *  Blends an RGBA value into the outline of the given ellipse.
   1.167 - *  
   1.168 - *  \return 0 on success, or -1 on error.
   1.169 - */
   1.170 -extern DECLSPEC int SDLCALL SDL_BlendEllipse
   1.171 -    (SDL_Surface * dst, int x, int y, int w, int h,
   1.172 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   1.173 -
   1.174 -/**
   1.175 - *  Fills the given ellipse with \c color.
   1.176 - *  
   1.177 - *  The color should be a pixel of the format used by the surface, and 
   1.178 - *  can be generated by the SDL_MapRGB() function.
   1.179 - *  
   1.180 - *  \return 0 on success, or -1 on error.
   1.181 - */
   1.182 -extern DECLSPEC int SDLCALL SDL_FillEllipse
   1.183 -    (SDL_Surface * dst, int x, int y, int w, int h, Uint32 color);
   1.184 -
   1.185 -/**
   1.186 - *  Blends an RGBA value into the given ellipse.
   1.187 - *  
   1.188 - *  \return This function returns 0 on success, or -1 on error.
   1.189 - */
   1.190 -extern DECLSPEC int SDLCALL SDL_BlendFillEllipse
   1.191 -    (SDL_Surface * dst, int x, int y, int w, int h,
   1.192 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   1.193 -#endif // 0
   1.194 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   1.195  
   1.196  /**
   1.197   *  Performs a fast blit from the source surface to the destination surface.