comparison 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
comparison
equal deleted inserted replaced
3535:b403f790df65 3536:0267b8b1595c
1146 * \return 0 on success, or -1 if there is no rendering context current. 1146 * \return 0 on success, or -1 if there is no rendering context current.
1147 */ 1147 */
1148 extern DECLSPEC int SDLCALL SDL_RenderPoint(int x, int y); 1148 extern DECLSPEC int SDLCALL SDL_RenderPoint(int x, int y);
1149 1149
1150 /** 1150 /**
1151 * \brief Draw some number of points on the current rendering target.
1152 *
1153 * \param points The points to draw
1154 * \param count The number of points to draw
1155 *
1156 * \return 0 on success, or -1 if there is no rendering context current.
1157 */
1158 extern DECLSPEC int SDLCALL SDL_RenderPoints(const SDL_Point * points,
1159 int count);
1160
1161 /**
1151 * \brief Draw a line on the current rendering target. 1162 * \brief Draw a line on the current rendering target.
1152 * 1163 *
1153 * \param x1 The x coordinate of the start point. 1164 * \param x1 The x coordinate of the start point.
1154 * \param y1 The y coordinate of the start point. 1165 * \param y1 The y coordinate of the start point.
1155 * \param x2 The x coordinate of the end point. 1166 * \param x2 The x coordinate of the end point.
1158 * \return 0 on success, or -1 if there is no rendering context current. 1169 * \return 0 on success, or -1 if there is no rendering context current.
1159 */ 1170 */
1160 extern DECLSPEC int SDLCALL SDL_RenderLine(int x1, int y1, int x2, int y2); 1171 extern DECLSPEC int SDLCALL SDL_RenderLine(int x1, int y1, int x2, int y2);
1161 1172
1162 /** 1173 /**
1174 * \brief Draw a series of connected lines on the current rendering target.
1175 *
1176 * \param points The points along the lines
1177 * \param count The number of points, drawing count-1 lines
1178 *
1179 * \return 0 on success, or -1 if there is no rendering context current.
1180 */
1181 extern DECLSPEC int SDLCALL SDL_RenderLines(const SDL_Point * points,
1182 int count);
1183
1184 /**
1163 * \brief Fill the current rendering target with the drawing color. 1185 * \brief Fill the current rendering target with the drawing color.
1164 * 1186 *
1165 * \param rect A pointer to the destination rectangle, or NULL for the entire 1187 * \param rect A pointer to the destination rectangle, or NULL for the entire
1166 * rendering target. 1188 * rendering target.
1167 * 1189 *
1168 * \return 0 on success, or -1 if there is no rendering context current. 1190 * \return 0 on success, or -1 if there is no rendering context current.
1169 */ 1191 */
1170 extern DECLSPEC int SDLCALL SDL_RenderFill(const SDL_Rect * rect); 1192 extern DECLSPEC int SDLCALL SDL_RenderRect(const SDL_Rect * rect);
1193
1194 /**
1195 * \brief Fill some number of rectangles in the current rendering target with the drawing color.
1196 *
1197 * \param rects A pointer to an array of destination rectangles.
1198 * \param count The number of rectangles.
1199 *
1200 * \return 0 on success, or -1 if there is no rendering context current.
1201 */
1202 extern DECLSPEC int SDLCALL SDL_RenderRects(const SDL_Rect ** rect, int count);
1171 1203
1172 /** 1204 /**
1173 * \brief Copy a portion of the texture to the current rendering target. 1205 * \brief Copy a portion of the texture to the current rendering target.
1174 * 1206 *
1175 * \param textureID The source texture. 1207 * \param textureID The source texture.