1 #ifndef GWORM_CANVAS_H_
2 #define GWORM_CANVAS_H_
15 Canvas() : canv(nullptr) { }
16 Canvas(SDL_Window *win, int index, Uint32 flags);
20 Canvas &operator =(Canvas &&);
22 Canvas(const Canvas &) = delete;
23 Canvas &operator =(const Canvas &) = delete;
26 Vector<int> Size() const;
35 void Line(Vector<int> from, Vector<int> to);
36 void FillRect(Vector<int> pos, Vector<int> size);
37 void OutlineRect(Vector<int> pos, Vector<int> size);
39 void Dot(Vector<int> pos);
40 void Cross(Vector<int> pos, int extent);
41 void Arrow(Vector<int> from, Vector<int> to);
42 void Triangle(Vector<int>, Vector<int>, Vector<int>);
43 void Quad(Vector<int>, Vector<int>, Vector<int>, Vector<int>);
45 void Grid(Vector<int> pos, Vector<int> size, Vector<int> step);
46 void Grid(Vector<int> pos, Vector<int> size, Vector<float> step);
48 void Grid2(Vector<int> pos, Vector<int> size, Vector<int> step,
49 Vector<int> n, Color, Color);
50 void Grid2(Vector<int> pos, Vector<int> size, Vector<float> step,
51 Vector<int> n, Color, Color);