Mercurial > sdl-ios-xcode
diff include/SDL_video.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 | 59ff7a2beb57 |
children | f638ded38b8a |
line wrap: on
line diff
--- a/include/SDL_video.h Mon Dec 07 10:08:24 2009 +0000 +++ b/include/SDL_video.h Wed Dec 09 15:56:56 2009 +0000 @@ -1148,6 +1148,17 @@ extern DECLSPEC int SDLCALL SDL_RenderPoint(int x, int y); /** + * \brief Draw some number of points on the current rendering target. + * + * \param points The points to draw + * \param count The number of points to draw + * + * \return 0 on success, or -1 if there is no rendering context current. + */ +extern DECLSPEC int SDLCALL SDL_RenderPoints(const SDL_Point * points, + int count); + +/** * \brief Draw a line on the current rendering target. * * \param x1 The x coordinate of the start point. @@ -1160,6 +1171,17 @@ extern DECLSPEC int SDLCALL SDL_RenderLine(int x1, int y1, int x2, int y2); /** + * \brief Draw a series of connected lines on the current rendering target. + * + * \param points The points along the lines + * \param count The number of points, drawing count-1 lines + * + * \return 0 on success, or -1 if there is no rendering context current. + */ +extern DECLSPEC int SDLCALL SDL_RenderLines(const SDL_Point * points, + int count); + +/** * \brief Fill the current rendering target with the drawing color. * * \param rect A pointer to the destination rectangle, or NULL for the entire @@ -1167,7 +1189,17 @@ * * \return 0 on success, or -1 if there is no rendering context current. */ -extern DECLSPEC int SDLCALL SDL_RenderFill(const SDL_Rect * rect); +extern DECLSPEC int SDLCALL SDL_RenderRect(const SDL_Rect * rect); + +/** + * \brief Fill some number of rectangles in the current rendering target with the drawing color. + * + * \param rects A pointer to an array of destination rectangles. + * \param count The number of rectangles. + * + * \return 0 on success, or -1 if there is no rendering context current. + */ +extern DECLSPEC int SDLCALL SDL_RenderRects(const SDL_Rect ** rect, int count); /** * \brief Copy a portion of the texture to the current rendering target.