diff options
author | chai <chaifix@163.com> | 2018-10-14 22:52:40 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-14 22:52:40 +0800 |
commit | b1bbc998960fff2169dc5a992c47d08723472f9b (patch) | |
tree | 220f3bd5de2266e248884e11161dd715d7632ef2 /src/libjin/Graphics/Image.h | |
parent | fbf989f9950a38566e0fb0fc5b6a7aebc9f0fb45 (diff) |
*直接渲染字符串
Diffstat (limited to 'src/libjin/Graphics/Image.h')
-rw-r--r-- | src/libjin/Graphics/Image.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/libjin/Graphics/Image.h b/src/libjin/Graphics/Image.h new file mode 100644 index 0000000..5c426dc --- /dev/null +++ b/src/libjin/Graphics/Image.h @@ -0,0 +1,33 @@ +#ifndef __LIBJIN_IMAGE_H +#define __LIBJIN_IMAGE_H + +#include "Bitmap.h" + +namespace jin +{ +namespace graphics +{ + + /* just like bitmap but only from image file*/ + class Image : public Bitmap + { + public: + static Image* createImage(const void* imgData, size_t size); + ~Image(); + + private: + Image(); + + void bind(Color* pixels, int w, int h); + void resetPixels(const Color* pixels, int w, int h); + void resetPixels(const Color& pixels, int w, int h); + void setPixel(const Color& pixel, int x, int y); + void setPixels(Color pixels); + void setPixels(Color* pixels); + + }; + +} +} + +#endif
\ No newline at end of file |