diff options
author | chai <chaifix@163.com> | 2018-09-08 13:11:17 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-09-08 13:11:17 +0800 |
commit | 1ccc798ca383fc941d624751293ed88e012900d1 (patch) | |
tree | e883d01cf2255b4d596cac838d82a5bcc14bfd1e /src | |
parent | c9bb26a90f3445cc6ca0bdfcb8283361dc9e6174 (diff) | |
parent | 571c848068c378985e27066ff261b584fda09173 (diff) |
*update
Diffstat (limited to 'src')
-rw-r--r-- | src/libjin/Graphics/Color.h | 11 | ||||
-rw-r--r-- | src/libjin/Graphics/Drawable.h | 1 | ||||
-rw-r--r-- | src/libjin/Graphics/Font.h | 1 | ||||
-rw-r--r-- | src/libjin/Graphics/Shader.h | 1 | ||||
-rw-r--r-- | src/libjin/Graphics/Window.h | 2 |
5 files changed, 16 insertions, 0 deletions
diff --git a/src/libjin/Graphics/Color.h b/src/libjin/Graphics/Color.h index e27c360..4d78706 100644 --- a/src/libjin/Graphics/Color.h +++ b/src/libjin/Graphics/Color.h @@ -25,6 +25,7 @@ namespace graphics static const Color MAGENTA; Color() { r = g = b = a = 0; }; + Color(unsigned char _r , unsigned char _g , unsigned char _b @@ -35,10 +36,20 @@ namespace graphics b = _b; a = _a; } + + Color(const Color& c) + { + r = c.r; + g = c.g; + b = c.b; + a = c.a; + } + bool operator == (const Color& c) { return r == c.r && g == c.g && b == c.b && a == c.a; } + bool operator != (const Color& c) { return !(r == c.r && g == c.g && b == c.b && a == c.a); diff --git a/src/libjin/Graphics/Drawable.h b/src/libjin/Graphics/Drawable.h index bd5dfc5..ff82365 100644 --- a/src/libjin/Graphics/Drawable.h +++ b/src/libjin/Graphics/Drawable.h @@ -16,6 +16,7 @@ namespace graphics public: Drawable(int w = 0, int h = 0); virtual ~Drawable(); + void setAnchor(int x, int y); void draw(int x, int y, float sx, float sy, float r); inline int getWidth() const { return size.w; } diff --git a/src/libjin/Graphics/Font.h b/src/libjin/Graphics/Font.h index 5435581..e4fa12b 100644 --- a/src/libjin/Graphics/Font.h +++ b/src/libjin/Graphics/Font.h @@ -16,6 +16,7 @@ namespace graphics { public: Font(); + void loadFile(const char* file); void loadMemory(const unsigned char* data); void render( diff --git a/src/libjin/Graphics/Shader.h b/src/libjin/Graphics/Shader.h index db6126f..70e6c1d 100644 --- a/src/libjin/Graphics/Shader.h +++ b/src/libjin/Graphics/Shader.h @@ -24,6 +24,7 @@ namespace graphics static void unuse(); virtual ~JSLProgram(); + void use(); void sendFloat(const char* name, float number); void sendTexture(const char* name, const Texture* image); diff --git a/src/libjin/Graphics/Window.h b/src/libjin/Graphics/Window.h index 0d18365..ebd776e 100644 --- a/src/libjin/Graphics/Window.h +++ b/src/libjin/Graphics/Window.h @@ -35,7 +35,9 @@ namespace graphics private: SINGLETON(Window); + Window() {}; + virtual ~Window() {}; bool initSystem(const SettingBase* setting) override; void quitSystem() override; |