DGtal  1.5.beta
LibBoard::Rect Struct Reference

Struct representing a rectangle on the plane. More...

#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

◆ Rect()

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 height
Definition: Rect.h:31
double width
Definition: Rect.h:30
double left
Definition: Rect.h:28
double top
Definition: Rect.h:29

Member Function Documentation

◆ bottomLeft()

Point LibBoard::Rect::bottomLeft ( )
inline

Definition at line 47 of file Rect.h.

47 { return Point( left, top - height ); }
MyPointD Point
Definition: testClone2.cpp:383

◆ bottomRight()

Point LibBoard::Rect::bottomRight ( )
inline

Definition at line 48 of file Rect.h.

48 { return Point( left + width, top - height ); }

◆ topLeft()

Point LibBoard::Rect::topLeft ( )
inline

Definition at line 45 of file Rect.h.

45 { return Point( left, top ); }

◆ topRight()

Point LibBoard::Rect::topRight ( )
inline

Definition at line 46 of file Rect.h.

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

Field Documentation

◆ height

◆ left

◆ top

◆ width


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