The Battle for Wesnoth  1.15.0+dev
Namespaces | Functions
rect.cpp File Reference
#include "sdl/point.hpp"
#include "sdl/rect.hpp"
#include "sdl/window.hpp"
#include "video.hpp"
Include dependency graph for rect.cpp:

Go to the source code of this file.

Namespaces

 sdl
 

Functions

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...
 
void sdl::draw_rectangle (const SDL_Rect &rect, const color_t &color)
 Draw a rectangle outline. More...
 
void sdl::fill_rectangle (const SDL_Rect &rect, const color_t &color)
 Draws a filled rectangle. 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)
 

Function Documentation

◆ operator!=()

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

Definition at line 80 of file rect.cpp.

References operator==().

Referenced by sdl::fill_surface_rect().

◆ operator<<()

std::ostream& operator<< ( std::ostream &  s,
const SDL_Rect &  rect 
)

Definition at line 85 of file rect.cpp.

References s.

Referenced by sdl::fill_surface_rect().

◆ operator==()

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

Definition at line 75 of file rect.cpp.

Referenced by sdl::fill_surface_rect(), and operator!=().