The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Functions | Variables
rect.cpp File Reference
#include "sdl/rect.hpp"
#include "sdl/alpha.hpp"
#include "sdl/utils.hpp"
Include dependency graph for rect.cpp:

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 empty SDL_Rect. 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::rects_overlap (const SDL_Rect &rect1, const SDL_Rect &rect2)
 Tests whether two rectangles overlap. More...
 
SDL_Rect sdl::intersect_rects (SDL_Rect const &rect1, SDL_Rect const &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...
 
void sdl::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. More...
 
void sdl::draw_rectangle (int x, int y, int w, int h, Uint32 color, surface tg)
 Draw a colored rectangle on a surface. More...
 
void sdl::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. More...
 
bool operator== (const SDL_Rect &a, const SDL_Rect &b)
 
bool operator!= (const SDL_Rect &a, const SDL_Rect &b)
 

Variables

const SDL_Rect sdl::empty_rect = { 0, 0, 0, 0 }
 

Function Documentation

bool operator!= ( const SDL_Rect &  a,
const SDL_Rect &  b 
)

Definition at line 167 of file rect.cpp.

References operator==().

bool operator== ( const SDL_Rect &  a,
const SDL_Rect &  b 
)

Definition at line 162 of file rect.cpp.

Referenced by operator!=().