15 #ifndef SDL_RECT_HPP_INCLUDED
16 #define SDL_RECT_HPP_INCLUDED
23 #include <SDL_version.h>
45 SDL_Rect
create_rect(
const int x,
const int y,
const int w,
const int h);
48 GPU_Rect create_gpu_rect(
const float x,
const float y,
const float w,
72 bool rects_overlap(
const SDL_Rect& rect1,
const SDL_Rect& rect2);
94 SDL_Rect
union_rects(
const SDL_Rect &rect1,
const SDL_Rect &rect2);
145 SDL_FillRect(dst, dst_rect, color);
152 Uint8
b, Uint8
a = SDL_ALPHA_OPAQUE);
154 void draw_rect(
CVideo &video,
const SDL_Rect &rect, SDL_Color
color);
156 void draw_rect(
CVideo &video,
const SDL_Rect &rect, Uint8
r, Uint8
g,
157 Uint8
b, Uint8
a = SDL_ALPHA_OPAQUE);
SDL_Rect intersect_rects(SDL_Rect const &rect1, SDL_Rect const &rect2)
Calculates the intersection of two rectangles.
SDL_Rect union_rects(SDL_Rect const &rect1, SDL_Rect const &rect2)
Calculates the union of two rectangles.
void fill_rect(surface &dst, SDL_Rect *dst_rect, const Uint32 color)
Fill a rectangle on a given surface.
bool rects_overlap(const SDL_Rect &rect1, const SDL_Rect &rect2)
Tests whether two rectangles overlap.
const SDL_Rect empty_rect
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble b
void draw_solid_tinted_rectangle(int x, int y, int w, int h, int r, int g, int b, double alpha, surface target)
Fills a specified rectangle area of a surface with a given color and opacity.
bool operator==(const SDL_Rect &a, const SDL_Rect &b)
bool operator!=(const SDL_Rect &a, const SDL_Rect &b)
GLubyte GLubyte GLubyte GLubyte w
GLboolean GLboolean GLboolean GLboolean a
GLclampf GLclampf GLclampf alpha
bool point_in_rect(int x, int y, const SDL_Rect &rect)
Tests whether a point is inside a rectangle.
GLfloat GLfloat GLfloat GLfloat h
GLint GLint GLint GLint GLint x
GLdouble GLdouble GLdouble r
SDL_Rect create_rect(const int x, const int y, const int w, const int h)
Creates an empty SDL_Rect.
void fill_rect_alpha(SDL_Rect &rect, Uint32 color, Uint8 alpha, surface target)
Fills a specified area of a surface with a given color and opacity.
void draw_rectangle(int x, int y, int w, int h, Uint32 color, surface target)
Draw a colored rectangle on a surface.