Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
mir::geometry::Rectangle Struct Reference

#include <rectangle.h>

Public Member Functions

Point bottom_right () const
 The bottom right boundary point of the rectangle. More...
 
bool contains (Point const &p) const
 
bool contains (Rectangle const &r) const
 Test if the rectangle contains another. More...
 
bool overlaps (Rectangle const &r) const
 

Public Attributes

Point top_left
 
Size size
 

Member Function Documentation

geom::Point mir::geometry::Rectangle::bottom_right ( ) const

The bottom right boundary point of the rectangle.

Note that the returned point is not included in the rectangle area, that is, the rectangle is represented as [top_left,bottom_right).

bool mir::geometry::Rectangle::contains ( Point const &  p) const
bool mir::geometry::Rectangle::contains ( Rectangle const &  r) const

Test if the rectangle contains another.

Note that an empty rectangle can still contain other empty rectangles, which are treated as points or lines of thickness zero.

bool mir::geometry::Rectangle::overlaps ( Rectangle const &  r) const

Member Data Documentation

Size mir::geometry::Rectangle::size
Examples:
render_surfaces.cpp.
Point mir::geometry::Rectangle::top_left

The documentation for this struct was generated from the following files:

Copyright © 2012,2013 Canonical Ltd.
Generated on Wed Oct 30 18:52:19 UTC 2013