whitespace
This commit is contained in:
parent
c82f3aad2e
commit
3a39b282a5
68
image.hpp
68
image.hpp
@ -25,52 +25,50 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|
||||||
namespace util {
|
namespace util { namespace image {
|
||||||
namespace image {
|
template <typename T>
|
||||||
template <typename T>
|
struct buffer {
|
||||||
struct buffer {
|
typedef T value_type;
|
||||||
typedef T value_type;
|
|
||||||
|
|
||||||
buffer (util::extent2u);
|
buffer (util::extent2u);
|
||||||
buffer (size_t w, size_t h);
|
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);
|
||||||
buffer (size_t w, size_t h, size_t s, std::unique_ptr<T[]> &&data);
|
buffer (size_t w, size_t h, size_t s, std::unique_ptr<T[]> &&data);
|
||||||
|
|
||||||
buffer (const buffer<T>&) = delete;
|
buffer (const buffer<T>&) = delete;
|
||||||
buffer (buffer<T> &&) = default;
|
buffer (buffer<T> &&) = default;
|
||||||
|
|
||||||
void fill (T);
|
void fill (T);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
buffer<U> alloc (void) const;
|
buffer<U> alloc (void) const;
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
buffer<U> clone (void) const;
|
buffer<U> clone (void) const;
|
||||||
|
|
||||||
buffer<T> downsample (float factor) const;
|
buffer<T> downsample (float factor) const;
|
||||||
|
|
||||||
size_t w;
|
size_t w;
|
||||||
size_t h;
|
size_t h;
|
||||||
size_t s;
|
size_t s;
|
||||||
|
|
||||||
T operator[] (point<2,size_t>) const;
|
T operator[] (point<2,size_t>) const;
|
||||||
T& operator[] (point<2,size_t>);
|
T& operator[] (point<2,size_t>);
|
||||||
|
|
||||||
T operator[] (size_t) const;
|
T operator[] (size_t) const;
|
||||||
T& operator[] (size_t);
|
T& operator[] (size_t);
|
||||||
|
|
||||||
T* begin (void);
|
T* begin (void);
|
||||||
T* end (void);
|
T* end (void);
|
||||||
T* data (void);
|
T* data (void);
|
||||||
|
|
||||||
const T* begin (void) const;
|
const T* begin (void) const;
|
||||||
const T* end (void) const;
|
const T* end (void) const;
|
||||||
const T* data (void) const;
|
const T* data (void) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<T[]> m_data;
|
std::unique_ptr<T[]> m_data;
|
||||||
};
|
};
|
||||||
}
|
} }
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user