42 std::swap(
_width, src._width);
43 std::swap(
_height, src._height);
44 std::swap(
_data, src._data);
50 if(
this == &src)
return *
this;
59 if(
this == &src)
return *
this;
60 std::swap(
_width, src._width);
61 std::swap(
_height, src._height);
62 std::swap(
_data, src._data);
T * begin(void)
Definition: bitmap.h:81
bitmap(size_t width, size_t height, const T &init)
Construct an image of size width x height and set every pixel to 'init'.
Definition: bitmap.h:28
T * end(void)
Definition: bitmap.h:82
const T * begin(void) const
Definition: bitmap.h:78
size_t _height
Definition: bitmap.h:97
const T & operator()(size_t x, size_t y) const
Definition: bitmap.h:89
bitmap(size_t width, size_t height)
Construct an empty/unitialized bitmap of size width x height.
Definition: bitmap.h:22
std::unique_ptr< T[]> _data
Definition: bitmap.h:98
bitmap(void)
Default constructor.
Definition: bitmap.h:19
bitmap< T > & operator=(bitmap< T > &&src)
Move assignment operator.
Definition: bitmap.h:57
bitmap(bitmap< T > &&src)
Move constructor.
Definition: bitmap.h:40
size_t _width
Definition: bitmap.h:97
size_t width() const
Definition: bitmap.h:86
bitmap< T > & operator=(const bitmap< T > &src)
Assignment operator.
Definition: bitmap.h:48
const T * end(void) const
Definition: bitmap.h:79
bitmap(const bitmap< T > &src)
Copy constructor.
Definition: bitmap.h:34
size_t height() const
Definition: bitmap.h:87
void reshape(size_t width, size_t height)
reshape the bitmap (loss of old data)
Definition: bitmap.h:67
T & operator()(size_t x, size_t y)
Definition: bitmap.h:90
Definition: aggregatebsdf.h:29