summaryrefslogtreecommitdiff
path: root/plugingui/image.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-10-31 18:09:50 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2015-10-31 18:09:50 +0100
commitd11fe0c82c413c0bcb0b4f0ff464291aff4f36d4 (patch)
tree353dd36ccadae02399c15841eb493fe08d8c7eb3 /plugingui/image.h
parent5d76d943eca9734f7df2dc351871815385c571b3 (diff)
Refactored Image.
Diffstat (limited to 'plugingui/image.h')
-rw-r--r--plugingui/image.h27
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::