summaryrefslogtreecommitdiff
path: root/plugingui/image.h
diff options
context:
space:
mode:
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..0decc22 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() const;
+ size_t height() const;
- Colour getPixel(size_t x, size_t y);
+ Colour getPixel(size_t x, size_t y) const;
private:
- void setError(int err);
+ void setError();
- 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::