zenilib
0.5.3.0
|
#include "SDL_stdinc.h"
#include "SDL_error.h"
#include "SDL_pixels.h"
#include "SDL_rwops.h"
#include "begin_code.h"
#include "close_code.h"
Go to the source code of this file.
Classes | |
struct | SDL_Point |
The structure that defines a point. More... | |
struct | SDL_Rect |
A rectangle, with the origin at the upper left. More... | |
Typedefs | |
typedef struct SDL_Point | SDL_Point |
The structure that defines a point. More... | |
typedef struct SDL_Rect | SDL_Rect |
A rectangle, with the origin at the upper left. More... | |
Header file for SDL_rect definition and management functions.
Definition in file SDL_rect.h.
The structure that defines a point.
A rectangle, with the origin at the upper left.
DECLSPEC SDL_bool SDLCALL 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().
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().
DECLSPEC SDL_bool SDLCALL SDL_IntersectRect | ( | const SDL_Rect * | A, |
const SDL_Rect * | B, | ||
SDL_Rect * | result | ||
) |
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().
DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine | ( | const SDL_Rect * | rect, |
int * | X1, | ||
int * | Y1, | ||
int * | X2, | ||
int * | Y2 | ||
) |
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().
SDL_FORCE_INLINE SDL_bool SDL_RectEmpty | ( | const SDL_Rect * | r | ) |
Returns true if the rectangle has no area.
Definition at line 72 of file SDL_rect.h.
References SDL_Rect::h, SDL_FALSE, SDL_TRUE, and SDL_Rect::w.
Referenced by SDL_EnclosePoints(), SDL_HasIntersection(), SDL_IntersectRect(), SDL_IntersectRectAndLine(), SDL_SoftBlit(), SDL_UnionRect(), SDLTest_CommonEvent(), and SW_UpdateClipRect().
Returns true if the two rectangles are equal.
Definition at line 80 of file SDL_rect.h.
References SDL_Rect::h, SDL_FALSE, SDL_TRUE, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
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.