DGtal  0.9.4beta
Public Member Functions | Data Fields
LibBoard::Rect Struct Reference

#include <Board/Rect.h>

Public Member Functions

 Rect (double leftX=0.0f, double topY=0.0f, double rectWidth=0.0f, double rectHeight=0.0f)
 
Point topLeft ()
 
Point topRight ()
 
Point bottomLeft ()
 
Point bottomRight ()
 

Data Fields

double left
 
double top
 
double width
 
double height
 

Detailed Description

Struct representing a rectangle on the plane.

The Rectangle structure.

Definition at line 26 of file Rect.h.

Constructor & Destructor Documentation

LibBoard::Rect::Rect ( double  leftX = 0.0f,
double  topY = 0.0f,
double  rectWidth = 0.0f,
double  rectHeight = 0.0f 
)
inline

Rect constructor.

Parameters
leftXleft X
topYtop Y
rectWidthwidth
rectHeightheight

Definition at line 42 of file Rect.h.

43  :left( leftX ), top( topY ), width( rectWidth ), height( rectHeight ) { }
double top
Definition: Rect.h:29
double left
Definition: Rect.h:28
double height
Definition: Rect.h:31
double width
Definition: Rect.h:30

Member Function Documentation

Point LibBoard::Rect::bottomLeft ( )
inline

Definition at line 47 of file Rect.h.

47 { return Point( left, top - height ); }
Point LibBoard::Rect::bottomRight ( )
inline

Definition at line 48 of file Rect.h.

48 { return Point( left + width, top - height ); }
Point LibBoard::Rect::topLeft ( )
inline

Definition at line 45 of file Rect.h.

45 { return Point( left, top ); }
Point LibBoard::Rect::topRight ( )
inline

Definition at line 46 of file Rect.h.

46 { return Point( left + width, top ); }

Field Documentation

double LibBoard::Rect::height
double LibBoard::Rect::left
double LibBoard::Rect::top
double LibBoard::Rect::width

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