image: add extent query
This commit is contained in:
parent
e8d3cf8eb1
commit
da496d8162
@ -50,6 +50,8 @@ namespace util { namespace image {
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
constexpr size_t area (void) const;
|
||||
constexpr extent2u extent (void) const;
|
||||
|
||||
constexpr bool is_packed (void) const;
|
||||
|
||||
size_t w;
|
||||
|
10
image.ipp
10
image.ipp
@ -28,6 +28,16 @@ namespace util { namespace image {
|
||||
return w * h;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
constexpr extent2u
|
||||
buffer<T>::extent (void) const
|
||||
{
|
||||
return { w, h };
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
constexpr bool
|
||||
|
Loading…
x
Reference in New Issue
Block a user