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. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404346
This commit is contained in:
parent
d45158ea85
commit
6da163ab81
24 changed files with 1685 additions and 549 deletions
|
@ -1137,6 +1137,11 @@ extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(int blendMode);
|
|||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(int *blendMode);
|
||||
|
||||
/**
|
||||
* \brief Clear the current rendering target with the drawing color
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderClear();
|
||||
|
||||
/**
|
||||
* \brief Draw a point on the current rendering target.
|
||||
*
|
||||
|
@ -1145,7 +1150,7 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(int *blendMode);
|
|||
*
|
||||
* \return 0 on success, or -1 if there is no rendering context current.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderPoint(int x, int y);
|
||||
extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(int x, int y);
|
||||
|
||||
/**
|
||||
* \brief Draw some number of points on the current rendering target.
|
||||
|
@ -1155,8 +1160,8 @@ extern DECLSPEC int SDLCALL SDL_RenderPoint(int x, int y);
|
|||
*
|
||||
* \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);
|
||||
extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(const SDL_Point * points,
|
||||
int count);
|
||||
|
||||
/**
|
||||
* \brief Draw a line on the current rendering target.
|
||||
|
@ -1168,7 +1173,7 @@ extern DECLSPEC int SDLCALL SDL_RenderPoints(const SDL_Point * points,
|
|||
*
|
||||
* \return 0 on success, or -1 if there is no rendering context current.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderLine(int x1, int y1, int x2, int y2);
|
||||
extern DECLSPEC int SDLCALL SDL_RenderDrawLine(int x1, int y1, int x2, int y2);
|
||||
|
||||
/**
|
||||
* \brief Draw a series of connected lines on the current rendering target.
|
||||
|
@ -1178,18 +1183,37 @@ extern DECLSPEC int SDLCALL SDL_RenderLine(int x1, int y1, int x2, int y2);
|
|||
*
|
||||
* \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);
|
||||
extern DECLSPEC int SDLCALL SDL_RenderDrawLines(const SDL_Point * points,
|
||||
int count);
|
||||
|
||||
/**
|
||||
* \brief Fill the current rendering target with the drawing color.
|
||||
* \brief Draw a rectangle on the current rendering target with the drawing color.
|
||||
*
|
||||
* \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.
|
||||
*
|
||||
* \return 0 on success, or -1 if there is no rendering context current.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderDrawRect(const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Draw 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_RenderDrawRects(const SDL_Rect ** rect, int count);
|
||||
|
||||
/**
|
||||
* \brief Fill a rectangle on the current rendering target with the drawing color.
|
||||
*
|
||||
* \param rect A pointer to the destination rectangle, or NULL for the entire
|
||||
* rendering target.
|
||||
*
|
||||
* \return 0 on success, or -1 if there is no rendering context current.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderRect(const SDL_Rect * rect);
|
||||
extern DECLSPEC int SDLCALL SDL_RenderFillRect(const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Fill some number of rectangles in the current rendering target with the drawing color.
|
||||
|
@ -1199,7 +1223,37 @@ extern DECLSPEC int SDLCALL SDL_RenderRect(const SDL_Rect * rect);
|
|||
*
|
||||
* \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);
|
||||
extern DECLSPEC int SDLCALL SDL_RenderFillRects(const SDL_Rect ** rect, int count);
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* \brief Draw a circle on the current rendering target with the drawing color.
|
||||
*
|
||||
* \return 0 on success, or -1 if there is no rendering context current.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderDrawCircle(int x, int y, int radius);
|
||||
|
||||
/**
|
||||
* \brief Fill a circle on the current rendering target with the drawing color.
|
||||
*
|
||||
* \return 0 on success, or -1 if there is no rendering context current.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderFillCircle(int x, int y, int radius);
|
||||
|
||||
/**
|
||||
* \brief Draw an ellipse on the current rendering target with the drawing color.
|
||||
*
|
||||
* \return 0 on success, or -1 if there is no rendering context current.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderDrawEllipse(int x, int y, int w, int h);
|
||||
|
||||
/**
|
||||
* \brief Fill an ellipse on the current rendering target with the drawing color.
|
||||
*
|
||||
* \return 0 on success, or -1 if there is no rendering context current.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderFillEllipse(int x, int y, int w, int h);
|
||||
#endif // 0
|
||||
|
||||
/**
|
||||
* \brief Copy a portion of the texture to the current rendering target.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue