supertux
src
video
painter.hpp
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
25
class
Rect
;
26
struct
DrawingRequest
;
27
struct
FillRectRequest
;
28
struct
GetPixelRequest
;
29
struct
GradientRequest
;
30
struct
InverseEllipseRequest
;
31
struct
LineRequest
;
32
struct
TextureBatchRequest;
33
struct
TextureRequest
;
34
struct
TriangleRequest
;
35
36
class
Painter
37
{
38
public
:
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
55
private
:
56
Painter
(
const
Painter
&) =
delete
;
57
Painter
& operator=(
const
Painter
&) =
delete
;
58
};
59
60
#endif
61
62
/* EOF */
InverseEllipseRequest
Definition:
drawing_request.hpp:124
FillRectRequest
Definition:
drawing_request.hpp:108
Rect
Definition:
rect.hpp:30
DrawingRequest
Definition:
drawing_request.hpp:39
GetPixelRequest
Definition:
drawing_request.hpp:172
Painter
Definition:
painter.hpp:36
Color
Definition:
color.hpp:26
TextureRequest
Definition:
drawing_request.hpp:60
LineRequest
Definition:
drawing_request.hpp:140
GradientRequest
Definition:
drawing_request.hpp:86
TriangleRequest
Definition:
drawing_request.hpp:156
Generated by
1.8.13