[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

| Size2D [Ranges and Points] |

Two dimensional size object. More...

`#include <vigra/diff2d.hxx>`

Inheritance diagram for Size2D:

List of all members.

## Public Member Functions

int | area () const
int | height () const
Size2D & | operator+= (Diff2D const &offset)
Size2D | operator- () const
Size2D & | operator-= (Diff2D const &offset)
Size2D & | operator= (Diff2D const &v)
void | setHeight (int h)
void | setWidth (int w)
| Size2D (Diff2D const &v)
| Size2D (Size2D const &v)
| Size2D (int width, int height)
| Size2D ()
int | width () const

## Detailed Description

Two dimensional size object.

Specializes Diff2D for the specification of a 2-dimensional extent, in contrast to a point or position (for the latter use Point2D).

        // create an image that is 10 pixels squared
        Image new_image(Size2D(10,10));

#include <vigra/utilities.hxx>
Namespace: vigra

## Constructor & Destructor Documentation

Size2D | ( |  | ) |

Default Constructor. Init point at position (0,0)

Size2D | ( | int | width,
|  | int | height |
| ) |  |  |

Construct point at given position.

Size2D | ( | Size2D const & | v | ) |

Copy Constructor.

Size2D | ( | Diff2D const & | v | ) | `[explicit]`

Explicit conversion Constructor.

## Member Function Documentation

int area | ( |  | ) | const

Returns width()*height(), the area of a rectangle of this size.

int height | ( |  | ) | const

Query the height.

Size2D& operator+= | ( | Diff2D const & | offset | ) |

Increase size by specified offset.

Reimplemented from Diff2D.

Size2D operator- | ( |  | ) | const

Unary negation.

Reimplemented from Diff2D.

Size2D& operator-= | ( | Diff2D const & | offset | ) |

Decrease size by specified offset.

Reimplemented from Diff2D.

Size2D& operator= | ( | Diff2D const & | v | ) |

Copy Assigment.

Reimplemented from Diff2D.

void setHeight | ( | int | h | ) |

Change the height.

void setWidth | ( | int | w | ) |

Change the width.

int width | ( |  | ) | const

Query the width.

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

- vigra/diff2d.hxx

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.7.1 (3 Dec 2010)