17 Canvas() : canv(nullptr) { }
18 Canvas(SDL_Window *win, int index, Uint32 flags);
22 Canvas &operator =(Canvas &&);
24 Canvas(const Canvas &) = delete;
25 Canvas &operator =(const Canvas &) = delete;
28 Vector<int> Size() const;
32 Texture CreateStaticTexture(Vector<int> size);
33 Texture LoadTexture(const char *file);
34 Texture LoadTexture(const std::string &file) {
35 return LoadTexture(file.c_str());
38 void Copy(Texture &, Vector<int> to);
39 void Copy(Texture &, Rect<int> clip, Vector<int> to);
46 void Line(Vector<int> from, Vector<int> to);
47 void FillRect(Vector<int> pos, Vector<int> size);
48 void OutlineRect(Vector<int> pos, Vector<int> size);
50 void Dot(Vector<int> pos);
51 void Cross(Vector<int> pos, int extent);
52 void Arrow(Vector<int> from, Vector<int> to);
53 void Triangle(Vector<int>, Vector<int>, Vector<int>);
54 void Quad(Vector<int>, Vector<int>, Vector<int>, Vector<int>);
56 void Grid(Vector<int> pos, Vector<int> size, Vector<int> step);
57 void Grid(Vector<int> pos, Vector<int> size, Vector<float> step);
59 void Grid2(Vector<int> pos, Vector<int> size, Vector<int> step,
60 Vector<int> n, Color, Color);
61 void Grid2(Vector<int> pos, Vector<int> size, Vector<float> step,
62 Vector<int> n, Color, Color);