region: add extent query method 'size'
This commit is contained in:
parent
6bd9ad333c
commit
8ea1a04f57
@ -69,6 +69,15 @@ util::region<T>::diameter (void) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
template <typename T>
|
||||||
|
util::extent<typename util::region<T>::size_type>
|
||||||
|
util::region<T>::size (void) const
|
||||||
|
{
|
||||||
|
return { w, h };
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void
|
void
|
||||||
|
@ -47,6 +47,8 @@ namespace util {
|
|||||||
|
|
||||||
size_type area (void) const;
|
size_type area (void) const;
|
||||||
size_type diameter (void) const;
|
size_type diameter (void) const;
|
||||||
|
util::extent<size_type> size (void) const;
|
||||||
|
|
||||||
void scale (T factor);
|
void scale (T factor);
|
||||||
|
|
||||||
bool empty (void) const;
|
bool empty (void) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user