diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-06-04 18:36:00 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-06-04 18:37:42 +0200 |
commit | 3e747d769f63fde60f6095bd1ae7c651d4237f39 (patch) | |
tree | 92a5955413dac91972edf32b1824739038704720 /plugingui/image.h | |
parent | 538abc6cd8f4a5996640ec9800815fbac5c34b26 (diff) |
Make Colour movabl;e and make Image contain a vector of Colour instead of raw char data.
Diffstat (limited to 'plugingui/image.h')
-rw-r--r-- | plugingui/image.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugingui/image.h b/plugingui/image.h index 8d1fd59..4f591aa 100644 --- a/plugingui/image.h +++ b/plugingui/image.h @@ -27,6 +27,7 @@ #pragma once #include <string> +#include <vector> #include "colour.h" #include "resource.h" @@ -46,7 +47,7 @@ public: size_t width() const; size_t height() const; - Colour getPixel(size_t x, size_t y) const; + const Colour& getPixel(size_t x, size_t y) const; private: void setError(); @@ -55,7 +56,8 @@ private: std::size_t _width{0}; std::size_t _height{0}; - unsigned char* image_data{nullptr}; + std::vector<Colour> image_data; + Colour out_of_range{0.0f, 0.0f, 0.0f, 0.0f}; }; } // GUI:: |