Rect Class Reference

#include <rect.hpp>

List of all members.

Public Member Functions

 Rect ()
 Rect (int left_, int top_, int right_, int bottom_)
 Rect (int left_, int top_, const Size &size)
int get_width () const
int get_height () const

Public Attributes

int left
int top
int right
int bottom


Detailed Description

Definition at line 22 of file rect.hpp.


Constructor & Destructor Documentation

Rect::Rect (  )  [inline]

Definition at line 31 of file rect.hpp.

00031          :
00032     left(0),
00033     top(0),
00034     right(0),
00035     bottom(0)
00036   {}

Rect::Rect ( int  left_,
int  top_,
int  right_,
int  bottom_ 
) [inline]

Definition at line 38 of file rect.hpp.

00038                                                      :
00039     left(left_),
00040     top(top_),
00041     right(right_),
00042     bottom(bottom_)
00043   {}

Rect::Rect ( int  left_,
int  top_,
const Size size 
) [inline]

Definition at line 45 of file rect.hpp.

00045                                               :
00046     left(left_),
00047     top(top_),
00048     right(left_ + size.width),
00049     bottom(top_ + size.height)
00050   {}


Member Function Documentation

int Rect::get_width (  )  const [inline]

Definition at line 52 of file rect.hpp.

References left, and right.

Referenced by TextureManager::create_image_texture_raw(), and Surface::get_width().

00052 { return right - left; }

int Rect::get_height (  )  const [inline]

Definition at line 53 of file rect.hpp.

References bottom, and top.

Referenced by TextureManager::create_image_texture_raw(), and Surface::get_height().

00053 { return bottom - top; }


Member Data Documentation

int Rect::left

Definition at line 25 of file rect.hpp.

Referenced by Sector::collision_tile_attributes(), Sector::collision_tilemap(), TextureManager::create_image_texture_raw(), get_width(), Surface::get_x(), and Sector::is_free_of_tiles().

int Rect::top

Definition at line 26 of file rect.hpp.

Referenced by Sector::collision_tile_attributes(), Sector::collision_tilemap(), TextureManager::create_image_texture_raw(), get_height(), Surface::get_y(), and Sector::is_free_of_tiles().

int Rect::right

Definition at line 27 of file rect.hpp.

Referenced by Sector::collision_tile_attributes(), Sector::collision_tilemap(), get_width(), and Sector::is_free_of_tiles().

int Rect::bottom

Definition at line 28 of file rect.hpp.

Referenced by Sector::collision_tile_attributes(), Sector::collision_tilemap(), get_height(), and Sector::is_free_of_tiles().


The documentation for this class was generated from the following file:
Generated on Mon Jun 9 03:38:34 2014 for SuperTux by  doxygen 1.5.1