Mercurial > sdl-ios-xcode
comparison include/SDL_rect.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 | d3baf5ac4e37 |
children | f7b03b6838cb |
comparison
equal
deleted
inserted
replaced
3535:b403f790df65 | 3536:0267b8b1595c |
---|---|
41 extern "C" { | 41 extern "C" { |
42 /* *INDENT-ON* */ | 42 /* *INDENT-ON* */ |
43 #endif | 43 #endif |
44 | 44 |
45 /** | 45 /** |
46 * \brief The structure that defines a point | |
47 * | |
48 * \sa SDL_EnclosePoints | |
49 */ | |
50 typedef struct | |
51 { | |
52 int x; | |
53 int y; | |
54 } SDL_Point; | |
55 | |
56 /** | |
46 * \brief A rectangle, with the origin at the upper left. | 57 * \brief A rectangle, with the origin at the upper left. |
47 * | 58 * |
48 * \sa SDL_RectEmpty | 59 * \sa SDL_RectEmpty |
49 * \sa SDL_RectEquals | 60 * \sa SDL_RectEquals |
50 * \sa SDL_HasIntersection | 61 * \sa SDL_HasIntersection |
51 * \sa SDL_IntersectRect | 62 * \sa SDL_IntersectRect |
52 * \sa SDL_UnionRect | 63 * \sa SDL_UnionRect |
64 * \sa SDL_EnclosePoints | |
53 */ | 65 */ |
54 typedef struct SDL_Rect | 66 typedef struct SDL_Rect |
55 { | 67 { |
56 int x, y; | 68 int x, y; |
57 int w, h; | 69 int w, h; |
91 extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A, | 103 extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A, |
92 const SDL_Rect * B, | 104 const SDL_Rect * B, |
93 SDL_Rect * result); | 105 SDL_Rect * result); |
94 | 106 |
95 /** | 107 /** |
108 * \brief Calculate a minimal rectangle enclosing a set of points | |
109 * | |
110 * \return SDL_TRUE if any points were within the clipping rect | |
111 */ | |
112 extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points, | |
113 int count, | |
114 const SDL_Rect * clip, | |
115 SDL_Rect * result); | |
116 | |
117 /** | |
96 * \brief Calculate the intersection of a rectangle and line segment. | 118 * \brief Calculate the intersection of a rectangle and line segment. |
97 * | 119 * |
98 * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. | 120 * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. |
99 */ | 121 */ |
100 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect * | 122 extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect * |