C++ Java Unity
C++ Reference
RectangleInt Class Reference

Detailed Description

A 2D rectangular area, expressed in integer coordinates.

Inheritance diagram for RectangleInt:
Area

Public Member Functions

 RectangleInt ()
 
 RectangleInt (const RectangleInt &other)
 
 RectangleInt (int leftTopX, int leftTopY, int rightBottomX, int rightBottomY)
 
virtual ~RectangleInt ()
 
RectangleIntoperator= (const RectangleInt &other)
 
int getLeftTopX () const
 
int getLeftTopY () const
 
int getRightBottomX () const
 
int getRightBottomY () const
 
int getWidth () const
 
int getHeight () const
 
int getAreaSize () const
 
virtual TYPE getType () const
 Get the TYPE of area this instance represents. More...
 
- Public Member Functions inherited from Area
virtual ~Area ()
 

Protected Attributes

int left
 
int top
 
int right
 
int bottom
 

Additional Inherited Members

- Public Types inherited from Area
enum  TYPE {
  RECTANGLE,
  RECTANGLE_INT,
  INVALID
}
 The types of area that a given instance of Area can represent. More...
 

Constructor & Destructor Documentation

RectangleInt ( const RectangleInt other)
RectangleInt ( int  leftTopX,
int  leftTopY,
int  rightBottomX,
int  rightBottomY 
)
virtual ~RectangleInt ( )
virtual

Member Function Documentation

RectangleInt& operator= ( const RectangleInt other)
int getLeftTopX ( ) const
int getLeftTopY ( ) const
int getRightBottomX ( ) const
int getRightBottomY ( ) const
int getWidth ( ) const
int getHeight ( ) const
int getAreaSize ( ) const
virtual TYPE getType ( ) const
virtual

Get the TYPE of area this instance represents.

Implements Area.

Member Data Documentation

int left
protected
int top
protected
int right
protected
int bottom
protected