Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
SDL_rect.h File Reference
Header file for SDL_rect definition and management functions. More...
Go to the source code of this file.
Data Structures | |
| 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. | |
| typedef struct SDL_Rect | SDL_Rect |
| A rectangle, with the origin at the upper left. | |
Functions | |
| SDL_FORCE_INLINE SDL_bool | SDL_RectEmpty (const SDL_Rect *r) |
| Returns true if the rectangle has no area. | |
| SDL_FORCE_INLINE SDL_bool | SDL_RectEquals (const SDL_Rect *a, const SDL_Rect *b) |
| Returns true if the two rectangles are equal. | |
| DECLSPEC SDL_bool SDLCALL | SDL_HasIntersection (const SDL_Rect *A, const SDL_Rect *B) |
| Determine whether two rectangles intersect. | |
| DECLSPEC SDL_bool SDLCALL | SDL_IntersectRect (const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result) |
| Calculate the intersection of two rectangles. | |
| DECLSPEC void SDLCALL | SDL_UnionRect (const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result) |
| Calculate the union of two rectangles. | |
| 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. | |
| 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. | |
Detailed Description
Header file for SDL_rect definition and management functions.
Definition in file SDL_rect.h.
Typedef Documentation
The structure that defines a point.
- See also:
- SDL_EnclosePoints
A rectangle, with the origin at the upper left.
Function Documentation
| 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.
- Returns:
- SDL_TRUE if any points were within the clipping rect
Determine whether two rectangles intersect.
- Returns:
- SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
| DECLSPEC SDL_bool SDLCALL SDL_IntersectRect | ( | const SDL_Rect * | A, |
| const SDL_Rect * | B, | ||
| SDL_Rect * | result | ||
| ) |
Calculate the intersection of two rectangles.
- Returns:
- SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
| 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.
- Returns:
- SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
| 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.
Returns true if the two rectangles are equal.
Definition at line 80 of file SDL_rect.h.
Generated on Tue Jul 12 2022 13:56:25 by
1.7.2