Mercurial > sdl-ios-xcode
comparison include/SDL_video.h @ 3596:f638ded38b8a
Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Renamed SDL_RenderPoint() and SDL_RenderLine() to SDL_RenderDrawPoint() and SDL_RenderDrawLine().
Added API for rectangle drawing (as opposed to filling)
Added placeholder API functions for circles and ellipses ... I'm not sure whether these will stay.
Optimized software line drawing quite a bit.
Added support for Wu's anti-aliased line drawing, currently disabled by default.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 23 Dec 2009 01:55:00 +0000 |
parents | 0267b8b1595c |
children | 847549156244 |
comparison
equal
deleted
inserted
replaced
3595:b7c6828d4039 | 3596:f638ded38b8a |
---|---|
1136 * \sa SDL_SetRenderDrawBlendMode() | 1136 * \sa SDL_SetRenderDrawBlendMode() |
1137 */ | 1137 */ |
1138 extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(int *blendMode); | 1138 extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(int *blendMode); |
1139 | 1139 |
1140 /** | 1140 /** |
1141 * \brief Clear the current rendering target with the drawing color | |
1142 */ | |
1143 extern DECLSPEC int SDLCALL SDL_RenderClear(); | |
1144 | |
1145 /** | |
1141 * \brief Draw a point on the current rendering target. | 1146 * \brief Draw a point on the current rendering target. |
1142 * | 1147 * |
1143 * \param x The x coordinate of the point. | 1148 * \param x The x coordinate of the point. |
1144 * \param y The y coordinate of the point. | 1149 * \param y The y coordinate of the point. |
1145 * | 1150 * |
1146 * \return 0 on success, or -1 if there is no rendering context current. | 1151 * \return 0 on success, or -1 if there is no rendering context current. |
1147 */ | 1152 */ |
1148 extern DECLSPEC int SDLCALL SDL_RenderPoint(int x, int y); | 1153 extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(int x, int y); |
1149 | 1154 |
1150 /** | 1155 /** |
1151 * \brief Draw some number of points on the current rendering target. | 1156 * \brief Draw some number of points on the current rendering target. |
1152 * | 1157 * |
1153 * \param points The points to draw | 1158 * \param points The points to draw |
1154 * \param count The number of points to draw | 1159 * \param count The number of points to draw |
1155 * | 1160 * |
1156 * \return 0 on success, or -1 if there is no rendering context current. | 1161 * \return 0 on success, or -1 if there is no rendering context current. |
1157 */ | 1162 */ |
1158 extern DECLSPEC int SDLCALL SDL_RenderPoints(const SDL_Point * points, | 1163 extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(const SDL_Point * points, |
1159 int count); | 1164 int count); |
1160 | 1165 |
1161 /** | 1166 /** |
1162 * \brief Draw a line on the current rendering target. | 1167 * \brief Draw a line on the current rendering target. |
1163 * | 1168 * |
1164 * \param x1 The x coordinate of the start point. | 1169 * \param x1 The x coordinate of the start point. |
1166 * \param x2 The x coordinate of the end point. | 1171 * \param x2 The x coordinate of the end point. |
1167 * \param y2 The y coordinate of the end point. | 1172 * \param y2 The y coordinate of the end point. |
1168 * | 1173 * |
1169 * \return 0 on success, or -1 if there is no rendering context current. | 1174 * \return 0 on success, or -1 if there is no rendering context current. |
1170 */ | 1175 */ |
1171 extern DECLSPEC int SDLCALL SDL_RenderLine(int x1, int y1, int x2, int y2); | 1176 extern DECLSPEC int SDLCALL SDL_RenderDrawLine(int x1, int y1, int x2, int y2); |
1172 | 1177 |
1173 /** | 1178 /** |
1174 * \brief Draw a series of connected lines on the current rendering target. | 1179 * \brief Draw a series of connected lines on the current rendering target. |
1175 * | 1180 * |
1176 * \param points The points along the lines | 1181 * \param points The points along the lines |
1177 * \param count The number of points, drawing count-1 lines | 1182 * \param count The number of points, drawing count-1 lines |
1178 * | 1183 * |
1179 * \return 0 on success, or -1 if there is no rendering context current. | 1184 * \return 0 on success, or -1 if there is no rendering context current. |
1180 */ | 1185 */ |
1181 extern DECLSPEC int SDLCALL SDL_RenderLines(const SDL_Point * points, | 1186 extern DECLSPEC int SDLCALL SDL_RenderDrawLines(const SDL_Point * points, |
1182 int count); | 1187 int count); |
1183 | 1188 |
1184 /** | 1189 /** |
1185 * \brief Fill the current rendering target with the drawing color. | 1190 * \brief Draw a rectangle on the current rendering target with the drawing color. |
1191 * | |
1192 * \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target. | |
1193 * | |
1194 * \return 0 on success, or -1 if there is no rendering context current. | |
1195 */ | |
1196 extern DECLSPEC int SDLCALL SDL_RenderDrawRect(const SDL_Rect * rect); | |
1197 | |
1198 /** | |
1199 * \brief Draw some number of rectangles in the current rendering target with the drawing color. | |
1200 * | |
1201 * \param rects A pointer to an array of destination rectangles. | |
1202 * \param count The number of rectangles. | |
1203 * | |
1204 * \return 0 on success, or -1 if there is no rendering context current. | |
1205 */ | |
1206 extern DECLSPEC int SDLCALL SDL_RenderDrawRects(const SDL_Rect ** rect, int count); | |
1207 | |
1208 /** | |
1209 * \brief Fill a rectangle on the current rendering target with the drawing color. | |
1186 * | 1210 * |
1187 * \param rect A pointer to the destination rectangle, or NULL for the entire | 1211 * \param rect A pointer to the destination rectangle, or NULL for the entire |
1188 * rendering target. | 1212 * rendering target. |
1189 * | 1213 * |
1190 * \return 0 on success, or -1 if there is no rendering context current. | 1214 * \return 0 on success, or -1 if there is no rendering context current. |
1191 */ | 1215 */ |
1192 extern DECLSPEC int SDLCALL SDL_RenderRect(const SDL_Rect * rect); | 1216 extern DECLSPEC int SDLCALL SDL_RenderFillRect(const SDL_Rect * rect); |
1193 | 1217 |
1194 /** | 1218 /** |
1195 * \brief Fill some number of rectangles in the current rendering target with the drawing color. | 1219 * \brief Fill some number of rectangles in the current rendering target with the drawing color. |
1196 * | 1220 * |
1197 * \param rects A pointer to an array of destination rectangles. | 1221 * \param rects A pointer to an array of destination rectangles. |
1198 * \param count The number of rectangles. | 1222 * \param count The number of rectangles. |
1199 * | 1223 * |
1200 * \return 0 on success, or -1 if there is no rendering context current. | 1224 * \return 0 on success, or -1 if there is no rendering context current. |
1201 */ | 1225 */ |
1202 extern DECLSPEC int SDLCALL SDL_RenderRects(const SDL_Rect ** rect, int count); | 1226 extern DECLSPEC int SDLCALL SDL_RenderFillRects(const SDL_Rect ** rect, int count); |
1227 | |
1228 #if 0 | |
1229 /** | |
1230 * \brief Draw a circle on the current rendering target with the drawing color. | |
1231 * | |
1232 * \return 0 on success, or -1 if there is no rendering context current. | |
1233 */ | |
1234 extern DECLSPEC int SDLCALL SDL_RenderDrawCircle(int x, int y, int radius); | |
1235 | |
1236 /** | |
1237 * \brief Fill a circle on the current rendering target with the drawing color. | |
1238 * | |
1239 * \return 0 on success, or -1 if there is no rendering context current. | |
1240 */ | |
1241 extern DECLSPEC int SDLCALL SDL_RenderFillCircle(int x, int y, int radius); | |
1242 | |
1243 /** | |
1244 * \brief Draw an ellipse on the current rendering target with the drawing color. | |
1245 * | |
1246 * \return 0 on success, or -1 if there is no rendering context current. | |
1247 */ | |
1248 extern DECLSPEC int SDLCALL SDL_RenderDrawEllipse(int x, int y, int w, int h); | |
1249 | |
1250 /** | |
1251 * \brief Fill an ellipse on the current rendering target with the drawing color. | |
1252 * | |
1253 * \return 0 on success, or -1 if there is no rendering context current. | |
1254 */ | |
1255 extern DECLSPEC int SDLCALL SDL_RenderFillEllipse(int x, int y, int w, int h); | |
1256 #endif // 0 | |
1203 | 1257 |
1204 /** | 1258 /** |
1205 * \brief Copy a portion of the texture to the current rendering target. | 1259 * \brief Copy a portion of the texture to the current rendering target. |
1206 * | 1260 * |
1207 * \param textureID The source texture. | 1261 * \param textureID The source texture. |