1// SuperTux
2// Copyright (C) 2006 Matthias Braun <matze@braunis.de>
3// 2016 Ingo Ruhnke <grumbel@gmail.com>
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18#ifndef HEADER_SUPERTUX_VIDEO_PAINTER_HPP
19#define HEADER_SUPERTUX_VIDEO_PAINTER_HPP
20
21#include "math/rect.hpp"
22#include "math/vector.hpp"
23#include "video/color.hpp"
24
25class Rect;
26struct DrawingRequest;
27struct FillRectRequest;
28struct GetPixelRequest;
29struct GradientRequest;
30struct InverseEllipseRequest;
31struct LineRequest;
32struct TextureBatchRequest;
33struct TextureRequest;
34struct TriangleRequest;
35
36class Painter
37{
38public:
39 Painter() {}
40 virtual ~Painter() {}
41
42 virtual void draw_texture(const TextureRequest& request) = 0;
43 virtual void draw_gradient(const GradientRequest& request) = 0;
44 virtual void draw_filled_rect(const FillRectRequest& request) = 0;
45 virtual void draw_inverse_ellipse(const InverseEllipseRequest& request) = 0;
46 virtual void draw_line(const LineRequest& request) = 0;
47 virtual void draw_triangle(const TriangleRequest& request) = 0;
48
49 virtual void clear(const Color& color) = 0;
50 virtual void get_pixel(const GetPixelRequest& request) const = 0;
51
52 virtual void set_clip_rect(const Rect& rect) = 0;
53 virtual void clear_clip_rect() = 0;
54
55private:
56 Painter(const Painter&) = delete;
57 Painter& operator=(const Painter&) = delete;
58};
59
60#endif
61
62/* EOF */
63