]> git.localhorst.tv Git - orbi.git/blobdiff - src/graphics/Canvas.h
rotatable arm for character entities
[orbi.git] / src / graphics / Canvas.h
index f399b364dca60a8290ae9a5f5713b55c5abc1d9b..fdcc5a03d840b18f34c9bb4af18758d069eff916 100644 (file)
@@ -2,9 +2,11 @@
 #define ORBI_CANVAS_H_
 
 #include "Color.h"
+#include "Rect.h"
 #include "Texture.h"
 #include "Vector.h"
 
+#include <string>
 #include <SDL.h>
 
 
@@ -30,6 +32,9 @@ public:
 
        Texture CreateStaticTexture(Vector<int> size);
        Texture LoadTexture(const char *file);
+       Texture LoadTexture(const std::string &file) {
+               return LoadTexture(file.c_str());
+       }
 
        void Copy(Texture &, Vector<int> to);
        void Copy(Texture &, Rect<int> clip, Vector<int> to);
@@ -40,8 +45,16 @@ public:
        void Outline();
 
        void Line(Vector<int> from, Vector<int> to);
-       void FillRect(Vector<int> pos, Vector<int> size);
-       void OutlineRect(Vector<int> pos, Vector<int> size);
+       void FillRect(Rect<int>);
+       void OutlineRect(Rect<int>);
+       void OutlineRectRot(Rect<float>, Vector<float> origin, float rot);
+
+       void FillRect(Vector<int> pos, Vector<int> size) {
+               FillRect(Rect<int>(pos, size));
+       }
+       void OutlineRect(Vector<int> pos, Vector<int> size) {
+               OutlineRect(Rect<int>(pos, size));
+       }
 
        void Dot(Vector<int> pos);
        void Cross(Vector<int> pos, int extent);