Mercurial > sdl-ios-xcode
diff include/SDL_surface.h @ 3536:0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
SDL_DrawPoints()
SDL_BlendPoints()
SDL_BlendLines()
SDL_DrawLines()
SDL_FillRects()
SDL_BlendRects()
SDL_RenderPoints()
SDL_RenderLines()
SDL_RenderRects()
Renamed SDL_RenderFill() to SDL_RenderRect()
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 09 Dec 2009 15:56:56 +0000 |
parents | 147d6ef5be03 |
children | 6b69c5def097 |
line wrap: on
line diff
--- a/include/SDL_surface.h Mon Dec 07 10:08:24 2009 +0000 +++ b/include/SDL_surface.h Wed Dec 09 15:56:56 2009 +0000 @@ -405,6 +405,8 @@ */ extern DECLSPEC int SDLCALL SDL_DrawPoint (SDL_Surface * dst, int x, int y, Uint32 color); +extern DECLSPEC int SDLCALL SDL_DrawPoints + (SDL_Surface * dst, const SDL_Point * points, int count, Uint32 color); /** * Blends a point with an RGBA value. @@ -415,8 +417,11 @@ * \return 0 on success, or -1 on error. */ extern DECLSPEC int SDLCALL SDL_BlendPoint - (SDL_Surface * dst, int x, int y, int blendMode, - Uint8 r, Uint8 g, Uint8 b, Uint8 a); + (SDL_Surface * dst, int x, int y, + int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); +extern DECLSPEC int SDLCALL SDL_BlendPoints + (SDL_Surface * dst, const SDL_Point * points, int count, + int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /** * Draws a line with \c color. @@ -428,6 +433,8 @@ */ extern DECLSPEC int SDLCALL SDL_DrawLine (SDL_Surface * dst, int x1, int y1, int x2, int y2, Uint32 color); +extern DECLSPEC int SDLCALL SDL_DrawLines + (SDL_Surface * dst, const SDL_Point * points, int count, Uint32 color); /** * Blends an RGBA value along a line. @@ -435,16 +442,16 @@ * \return 0 on success, or -1 on error. */ extern DECLSPEC int SDLCALL SDL_BlendLine - (SDL_Surface * dst, int x1, int y1, int x2, int y2, int blendMode, - Uint8 r, Uint8 g, Uint8 b, Uint8 a); + (SDL_Surface * dst, int x1, int y1, int x2, int y2, + int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); +extern DECLSPEC int SDLCALL SDL_BlendLines + (SDL_Surface * dst, const SDL_Point * points, int count, + int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /** * Performs a fast fill of the given rectangle with \c color. * - * The given rectangle is clipped to the destination surface clip area - * and the final fill rectangle is saved in the passed in pointer. - * - * If \c dstrect is NULL, the whole surface will be filled with \c color. + * If \c rect is NULL, the whole surface will be filled with \c color. * * The color should be a pixel of the format used by the surface, and * can be generated by the SDL_MapRGB() function. @@ -452,21 +459,23 @@ * \return 0 on success, or -1 on error. */ extern DECLSPEC int SDLCALL SDL_FillRect - (SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color); + (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color); +extern DECLSPEC int SDLCALL SDL_FillRects + (SDL_Surface * dst, const SDL_Rect ** rects, int count, Uint32 color); /** * Blends an RGBA value into the given rectangle. * - * The given rectangle is clipped to the destination surface clip area - * and the final fill rectangle is saved in the passed in pointer. - * - * If \c dstrect is NULL, the whole surface will be filled with \c color. + * If \c rect is NULL, the whole surface will be filled with \c color. * * \return This function returns 0 on success, or -1 on error. */ extern DECLSPEC int SDLCALL SDL_BlendRect - (SDL_Surface * dst, SDL_Rect * dstrect, int blendMode, Uint8 r, Uint8 g, - Uint8 b, Uint8 a); + (SDL_Surface * dst, const SDL_Rect * rect, + int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); +extern DECLSPEC int SDLCALL SDL_BlendRects + (SDL_Surface * dst, const SDL_Rect ** rects, int count, + int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /** * Performs a fast blit from the source surface to the destination surface.