The Battle for Wesnoth  1.17.10+dev
Classes | Namespaces | Functions | Variables
rect.hpp File Reference

Contains the SDL_Rect helper code. More...

#include "sdl/point.hpp"
#include <SDL2/SDL_rect.h>
Include dependency graph for rect.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rect
 An abstract description of a rectangle with integer coordinates. More...
 

Namespaces

 sdl
 

Functions

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)
 
std::ostream & operator<< (std::ostream &, const rect &)
 

Variables

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

Detailed Description

Contains the SDL_Rect helper code.

Definition in file rect.hpp.

Function Documentation

◆ operator!=()

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

Definition at line 28 of file rect.cpp.

References operator==().

◆ operator<<() [1/2]

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

Definition at line 33 of file rect.cpp.

References s.

Referenced by rect::area().

◆ operator<<() [2/2]

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

Definition at line 112 of file rect.cpp.

References s.

◆ operator==()

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

Definition at line 23 of file rect.cpp.

Referenced by operator!=(), and rect::size().