Public Member Functions | Public Attributes

a5::Rectangle Class Reference
[Common]

Stores four coordinates representing a rectangle. More...

#include <common.hpp>

List of all members.

Public Member Functions

 Rectangle (unit x1_, unit y1_, unit x2_, unit y2_)
 Create a rectangle using the specified set of four coordinates.
unit Width () const
 Returns the width of the rectangle.
unit Height () const
 Returns the height of the rectangle.
unit Size () const
 Returns the size of the rectangle (width * height).

Public Attributes

unit x1
 X coordinate of top-left corner of rectangle.
unit y1
 Y coordinate of top-left corner of rectangle.
unit x2
 X coordinate of bottom-right corner of rectangle.
unit y2
 Y coordinate of bottom-right corner of rectangle.

Detailed Description

Stores four coordinates representing a rectangle.


Constructor & Destructor Documentation

a5::Rectangle::Rectangle ( unit  x1_,
unit  y1_,
unit  x2_,
unit  y2_ 
)

Create a rectangle using the specified set of four coordinates.


Member Function Documentation

unit a5::Rectangle::Width (  )  const

Returns the width of the rectangle.

unit a5::Rectangle::Height (  )  const

Returns the height of the rectangle.

unit a5::Rectangle::Size (  )  const

Returns the size of the rectangle (width * height).


Member Data Documentation

X coordinate of top-left corner of rectangle.

Y coordinate of top-left corner of rectangle.

X coordinate of bottom-right corner of rectangle.

Y coordinate of bottom-right corner of rectangle.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Defines