Public Member Functions

mln::win::rectangle2d Struct Reference
[2D windows]

Rectangular window defined on the 2D square grid. More...

#include <rectangle2d.hh>

Inherits classical_window_base< dpoint2d, rectangle2d >.

List of all members.

Public Member Functions

unsigned area () const
 Give the rectangle area.
unsigned height () const
 Give the rectangle height.
 rectangle2d (unsigned height, unsigned width)
 Constructor.
const std::vector< dpoint2d > & std_vector () const
 Give the std vector of delta-points.
unsigned width () const
 Give the rectangle width.

Detailed Description

Rectangular window defined on the 2D square grid.

A rectangle2d is a 2D window with rectangular shape. It is centered and symmetric.

For instance:

     *  o o o o o
     *  o o x o o
     *  o o o o o
     * 

is defined with height = 3 and width = 5.

Definition at line 64 of file rectangle2d.hh.


Constructor & Destructor Documentation

mln::win::rectangle2d::rectangle2d ( unsigned  height,
unsigned  width 
) [inline]

Constructor.

Parameters:
[in] height Height of the rectangle2d.
[in] width Width of the rectangle2d.
Precondition:
Height and width are odd.

Definition at line 106 of file rectangle2d.hh.


Member Function Documentation

unsigned mln::win::rectangle2d::area (  )  const [inline]

Give the rectangle area.

Definition at line 132 of file rectangle2d.hh.

unsigned mln::win::rectangle2d::height (  )  const [inline]

Give the rectangle height.

Definition at line 120 of file rectangle2d.hh.

const std::vector< dpoint2d > & mln::win::rectangle2d::std_vector (  )  const [inline]

Give the std vector of delta-points.

Definition at line 145 of file rectangle2d.hh.

unsigned mln::win::rectangle2d::width (  )  const [inline]

Give the rectangle width.

Definition at line 126 of file rectangle2d.hh.