diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-10-31 18:09:50 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-10-31 18:09:50 +0100 |
commit | d11fe0c82c413c0bcb0b4f0ff464291aff4f36d4 (patch) | |
tree | 353dd36ccadae02399c15841eb493fe08d8c7eb3 /plugingui/image.h | |
parent | 5d76d943eca9734f7df2dc351871815385c571b3 (diff) |
Refactored Image.
Diffstat (limited to 'plugingui/image.h')
-rw-r--r-- | plugingui/image.h | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/plugingui/image.h b/plugingui/image.h index cec1518..1a6e40a 100644 --- a/plugingui/image.h +++ b/plugingui/image.h @@ -24,8 +24,7 @@ * along with DrumGizmo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef __DRUMGIZMO_IMAGE_H__ -#define __DRUMGIZMO_IMAGE_H__ +#pragma once #include <string> @@ -36,24 +35,22 @@ namespace GUI { class Image { public: - Image(const char* data, size_t size); - Image(std::string filename); - ~Image(); + Image(const char* data, size_t size); + Image(const std::string& filename); + ~Image(); - size_t width(); - size_t height(); + size_t width(); + size_t height(); - Colour getPixel(size_t x, size_t y); + Colour getPixel(size_t x, size_t y); private: - void setError(int err); + void setError(int err); - void load(const char* data, size_t size); + void load(const char* data, size_t size); - size_t w, h; - unsigned char *image_data; + size_t _width, _height; + unsigned char* image_data; }; -}; - -#endif/*__DRUMGIZMO_IMAGE_H__*/ +} // GUI:: |