aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Graphics/Image.h
blob: bed1986bc64620f86636c319402cf356e50918c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef __LIBJIN_IMAGE_H
#define __LIBJIN_IMAGE_H

#include "Bitmap.h"

namespace jin
{
    namespace graphics
    {

	    /* just like bitmap but only from image file*/
	    /* readonly bitmap */
	    class Image : public Bitmap
	    {
	    public:
            static Image* createImage(const char* path);
		    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