zenilib
0.5.3.0
|
Go to the source code of this file.
Macros | |
#define | CODE_BOTTOM 1 |
#define | CODE_LEFT 4 |
#define | CODE_RIGHT 8 |
#define | CODE_TOP 2 |
Functions | |
static int | ComputeOutCode (const SDL_Rect *rect, int x, int y) |
SDL_bool | SDL_EnclosePoints (const SDL_Point *points, int count, const SDL_Rect *clip, SDL_Rect *result) |
Calculate a minimal rectangle enclosing a set of points. More... | |
SDL_bool | SDL_GetSpanEnclosingRect (int width, int height, int numrects, const SDL_Rect *rects, SDL_Rect *span) |
SDL_bool | SDL_HasIntersection (const SDL_Rect *A, const SDL_Rect *B) |
Determine whether two rectangles intersect. More... | |
SDL_bool | SDL_IntersectRect (const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result) |
Calculate the intersection of two rectangles. More... | |
SDL_bool | SDL_IntersectRectAndLine (const SDL_Rect *rect, int *X1, int *Y1, int *X2, int *Y2) |
Calculate the intersection of a rectangle and line segment. More... | |
void | SDL_UnionRect (const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result) |
Calculate the union of two rectangles. More... | |
#define CODE_BOTTOM 1 |
Definition at line 294 of file SDL_rect.c.
Referenced by ComputeOutCode(), and SDL_IntersectRectAndLine().
#define CODE_LEFT 4 |
Definition at line 296 of file SDL_rect.c.
Referenced by ComputeOutCode(), and SDL_IntersectRectAndLine().
#define CODE_RIGHT 8 |
Definition at line 297 of file SDL_rect.c.
Referenced by ComputeOutCode(), and SDL_IntersectRectAndLine().
#define CODE_TOP 2 |
Definition at line 295 of file SDL_rect.c.
Referenced by ComputeOutCode(), and SDL_IntersectRectAndLine().
Definition at line 299 of file SDL_rect.c.
References CODE_BOTTOM, CODE_LEFT, CODE_RIGHT, CODE_TOP, SDL_Rect::h, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_IntersectRectAndLine().
SDL_bool SDL_EnclosePoints | ( | const SDL_Point * | points, |
int | count, | ||
const SDL_Rect * | clip, | ||
SDL_Rect * | result | ||
) |
Calculate a minimal rectangle enclosing a set of points.
Definition at line 192 of file SDL_rect.c.
References SDL_Rect::h, i, NULL, SDL_FALSE, SDL_InvalidParamError, SDL_RectEmpty(), SDL_TRUE, SDL_Rect::w, SDL_Point::x, SDL_Rect::x, SDL_Point::y, and SDL_Rect::y.
Referenced by SDL_GetWindowDisplayIndex().
SDL_bool SDL_GetSpanEnclosingRect | ( | int | width, |
int | height, | ||
int | numrects, | ||
const SDL_Rect * | rects, | ||
SDL_Rect * | span | ||
) |
Definition at line 462 of file SDL_rect.c.
References SDL_Rect::h, i, SDL_FALSE, SDL_InvalidParamError, SDL_TRUE, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_UpdateWindowTexture().
Determine whether two rectangles intersect.
Definition at line 28 of file SDL_rect.c.
References SDL_Rect::h, SDL_FALSE, SDL_InvalidParamError, SDL_RectEmpty(), SDL_TRUE, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_RenderCopy().
Calculate the intersection of two rectangles.
Definition at line 75 of file SDL_rect.c.
References SDL_Rect::h, SDL_FALSE, SDL_InvalidParamError, SDL_RectEmpty(), SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_BlendFillRect(), SDL_BlendFillRects(), SDL_FillRect(), SDL_LowerBlitScaled(), SDL_RenderCopy(), SDL_RenderCopyEx(), SDL_RenderReadPixels(), and SDL_SetClipRect().
Calculate the intersection of a rectangle and line segment.
Definition at line 316 of file SDL_rect.c.
References CODE_BOTTOM, CODE_LEFT, CODE_RIGHT, CODE_TOP, ComputeOutCode(), SDL_Rect::h, SDL_FALSE, SDL_InvalidParamError, SDL_RectEmpty(), SDL_TRUE, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_BlendLine(), SDL_BlendLines(), SDL_DrawLine(), and SDL_DrawLines().
Calculate the union of two rectangles.
Definition at line 129 of file SDL_rect.c.
References SDL_Rect::h, SDL_InvalidParamError, SDL_RectEmpty(), SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.