Mercurial > sdl-ios-xcode
diff include/SDL_surface.h @ 3593:b931bcfd94a0
In the process of adding rectangle drawing
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 18 Dec 2009 07:03:09 +0000 |
parents | 5543db4239e6 |
children | f638ded38b8a |
line wrap: on
line diff
--- a/include/SDL_surface.h Thu Dec 17 07:47:03 2009 +0000 +++ b/include/SDL_surface.h Fri Dec 18 07:03:09 2009 +0000 @@ -416,7 +416,7 @@ * * \return 0 on success, or -1 on error. */ -extern DECLSPEC int SDLCALL SDL_BlendPoint +extern DECLSPEC int SDLCALL SDL_BlendDrawPoint (SDL_Surface * dst, int x, int y, int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); extern DECLSPEC int SDLCALL SDL_BlendPoints @@ -449,6 +449,35 @@ int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); /** + * Draws the given rectangle with \c color. + * + * If \c rect is NULL, the whole surface will be outlined 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. + * + * \return 0 on success, or -1 on error. + */ +extern DECLSPEC int SDLCALL SDL_DrawRect + (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color); +extern DECLSPEC int SDLCALL SDL_DrawRects + (SDL_Surface * dst, const SDL_Rect ** rects, int count, Uint32 color); + +/** + * Blends the given rectangle with \c color. + * + * If \c rect is NULL, the whole surface will have a blended outline of \c color. + * + * \return 0 on success, or -1 on error. + */ +extern DECLSPEC int SDLCALL SDL_BlendRect + (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 fill of the given rectangle with \c color. * * If \c rect is NULL, the whole surface will be filled with \c color. @@ -466,14 +495,14 @@ /** * Blends an RGBA value into the given rectangle. * - * If \c rect is NULL, the whole surface will be filled with \c color. + * If \c rect is NULL, the whole surface will be blended with \c color. * * \return This function returns 0 on success, or -1 on error. */ -extern DECLSPEC int SDLCALL SDL_BlendRect +extern DECLSPEC int SDLCALL SDL_BlendFillRect (SDL_Surface * dst, const SDL_Rect * rect, int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a); -extern DECLSPEC int SDLCALL SDL_BlendRects +extern DECLSPEC int SDLCALL SDL_BlendFillRects (SDL_Surface * dst, const SDL_Rect ** rects, int count, int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);