image: add constructor from extent
This commit is contained in:
parent
a61ea32228
commit
3ff420978e
@ -122,6 +122,13 @@ private:
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
util::image::buffer<T>::buffer (util::extent2u _size):
|
||||
buffer<T> (_size.w, _size.h)
|
||||
{ ; }
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
util::image::buffer<T>::buffer (size_t _w, size_t _h, size_t _s):
|
||||
|
@ -17,6 +17,8 @@
|
||||
#ifndef __UTIL_IMAGE_HPP
|
||||
#define __UTIL_IMAGE_HPP
|
||||
|
||||
#include "extent.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
@ -29,6 +31,7 @@ namespace util {
|
||||
struct buffer {
|
||||
typedef T value_type;
|
||||
|
||||
buffer (util::extent2u);
|
||||
buffer (size_t w, size_t h);
|
||||
buffer (size_t w, size_t h, size_t s);
|
||||
buffer (size_t w, size_t h, size_t s, std::unique_ptr<T[]> &&data);
|
||||
|
Loading…
Reference in New Issue
Block a user