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

| Size2D Class Reference |

Two dimensional size object. More...

`#include <vigra/diff2d.hxx>`

Inheritance diagram for Size2D:

## 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 ()
| Size2D (Diff2D const &v)
| Size2D (int width, int height)
| Size2D (Size2D const &v)
int | width () const
Public Member Functions inherited from Diff2D
column_iterator | columnIterator () const
| Diff2D ()
| Diff2D (Diff2D const &v)
| Diff2D (int ax, int ay)
double | magnitude () const
bool | operator!= (Diff2D const &r) const
index_reference | operator() (int const &dx, int const &dy) const
reference | operator* () const
Diff2D | operator* (double factor) const
Diff2D | operator* (int factor) const
Diff2D & | operator*= (double factor)
Diff2D & | operator*= (int factor)
Diff2D & | operator+= (Diff2D const &offset)
Diff2D | operator- () const
Diff2D & | operator-= (Diff2D const &offset)
pointer | operator-> () const
Diff2D | operator/ (double factor) const
Diff2D | operator/ (int factor) const
Diff2D & | operator/= (double factor)
Diff2D & | operator/= (int factor)
Diff2D & | operator= (Diff2D const &v)
bool | operator== (Diff2D const &r) const
index_reference | operator[] (Diff2D const &offset) const
int | operator[] (int index) const
row_iterator | rowIterator () const
int | squaredMagnitude () const

## Additional Inherited Members

Public Types inherited from Diff2D
typedef IteratorAdaptor< Diff2DConstColumnIteratorPolicy< Diff2D > > | column_iterator
typedef Diff2D | difference_type
typedef Diff2D | index_reference
typedef image_traverser_tag | iterator_category
typedef int | MoveX
typedef int | MoveY
typedef Diff2D | PixelType
typedef const Diff2D * | pointer
typedef const Diff2D & | reference
typedef IteratorAdaptor< Diff2DConstRowIteratorPolicy< Diff2D > > | row_iterator
typedef Diff2D | value_type
Public Attributes inherited from Diff2D
int | x
int | y

## 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/diff2d.hxx>
Namespace: vigra

## Constructor & Destructor Documentation

## ◆ Size2D() [1/4]

Size2D | ( |  | ) |

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

## ◆ Size2D() [2/4]

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

Construct point at given position.

## ◆ Size2D() [3/4]

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

Copy Constructor.

## ◆ Size2D() [4/4]

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

explicit

Explicit conversion Constructor.

## Member Function Documentation

## ◆ width()

int width | ( |  | ) | const

Query the width.

## ◆ height()

int height | ( |  | ) | const

Query the height.

## ◆ setWidth()

void setWidth | ( | int | w | ) |

Change the width.

## ◆ setHeight()

void setHeight | ( | int | h | ) |

Change the height.

## ◆ area()

int area | ( |  | ) | const

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

## ◆ operator=()

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

Copy Assigment.

## ◆ operator-()

Size2D operator- | ( |  | ) | const

Unary negation.

## ◆ operator+=()

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

Increase size by specified offset.

## ◆ operator-=()

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

Decrease size by specified offset.

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

- vigra/diff2d.hxx

vigra::Size2D::Size2D
Size2D()
Definition: diff2d.hxx:487

© 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.11.1