Contains the SDL_Rect helper code. More...
Go to the source code of this file.
Namespaces | |
sdl | |
Functions | |
SDL_Rect | sdl::create_rect (const int x, const int y, const int w, const int h) |
Creates an SDL_Rect with the given dimensions. More... | |
SDL_Rect | sdl::create_rect (const point &origin, const point &size) |
Creates a rectangle. More... | |
bool | sdl::point_in_rect (int x, int y, const SDL_Rect &rect) |
Tests whether a point is inside a rectangle. More... | |
bool | sdl::point_in_rect (const point &point, const SDL_Rect &rect) |
bool | sdl::rects_overlap (const SDL_Rect &rect1, const SDL_Rect &rect2) |
Tests whether two rectangles overlap. More... | |
SDL_Rect | sdl::intersect_rects (const SDL_Rect &rect1, const SDL_Rect &rect2) |
Calculates the intersection of two rectangles. More... | |
SDL_Rect | sdl::union_rects (const SDL_Rect &rect1, const SDL_Rect &rect2) |
Calculates the union of two rectangles. More... | |
bool | operator== (const SDL_Rect &a, const SDL_Rect &b) |
bool | operator!= (const SDL_Rect &a, const SDL_Rect &b) |
std::ostream & | operator<< (std::ostream &s, const SDL_Rect &rect) |
Variables | |
constexpr const SDL_Rect | sdl::empty_rect { 0, 0, 0, 0 } |
Contains the SDL_Rect helper code.
Definition in file rect.hpp.
bool operator!= | ( | const SDL_Rect & | a, |
const SDL_Rect & | b | ||
) |
std::ostream& operator<< | ( | std::ostream & | s, |
const SDL_Rect & | rect | ||
) |
bool operator== | ( | const SDL_Rect & | a, |
const SDL_Rect & | b | ||
) |
Definition at line 62 of file rect.cpp.
Referenced by sdl::create_rect(), and operator!=().