aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Graphics/je_sprite.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/Graphics/je_sprite.h')
-rw-r--r--src/libjin/Graphics/je_sprite.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/libjin/Graphics/je_sprite.h b/src/libjin/Graphics/je_sprite.h
new file mode 100644
index 0000000..3b96162
--- /dev/null
+++ b/src/libjin/Graphics/je_sprite.h
@@ -0,0 +1,38 @@
+#ifndef __JE_SPRITE_H
+#define __JE_SPRITE_H
+
+#include "../common/je_types.h"
+#include "../math/je_vector2.hpp"
+
+#include "shader/je_shader.h"
+#include "je_color.h"
+
+namespace JinEngine
+{
+ namespace Graphics
+ {
+ ///
+ /// A sprite is unit of rendering, logic and events.
+ ///
+ class Sprite
+ {
+ public:
+ void setOrigin(float x, float y);
+ void setPosition(int x, int y);
+ void setScale(float x, float y);
+ void setColor(Color color);
+ void setShader(const Shader* shader);
+
+ private:
+ Math::Vector2<int> mPosition;
+ Math::Vector2<float> mOrigin;
+ Math::Vector2<float> mScale;
+ Color mColor;
+ const Shader* mShader;
+
+ };
+
+ } // namespace Graphics
+} // namespace JinEngine
+
+#endif \ No newline at end of file