2 // Copyright (C) 2006 Matthias Braun <matze@braunis.de>
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef HEADER_SUPERTUX_VIDEO_DRAWING_REQUEST_HPP
18 #define HEADER_SUPERTUX_VIDEO_DRAWING_REQUEST_HPP
26 #include "math/vector.hpp"
27 #include "video/color.hpp"
28 #include "video/drawing_context.hpp"
29 #include "video/font.hpp"
30 #include "video/glutil.hpp"
36 SURFACE, SURFACE_PART, TEXT, GRADIENT, FILLRECT, INVERSEELLIPSE, DRAW_LIGHTMAP, GETLIGHT
39 struct DrawingRequestData
41 virtual ~DrawingRequestData()
45 struct SurfaceRequest : public DrawingRequestData
51 const Surface* surface;
54 SurfaceRequest(const SurfaceRequest&) = delete;
55 SurfaceRequest& operator=(const SurfaceRequest&) = delete;
58 struct SurfacePartRequest : public DrawingRequestData
60 SurfacePartRequest() :
66 const Surface* surface;
71 SurfacePartRequest(const SurfacePartRequest&) = delete;
72 SurfacePartRequest& operator=(const SurfacePartRequest&) = delete;
75 struct TextRequest : public DrawingRequestData
85 FontAlignment alignment;
88 TextRequest(const TextRequest&);
89 TextRequest& operator=(const TextRequest&);
92 struct GradientRequest : public DrawingRequestData
105 struct FillRectRequest : public DrawingRequestData
118 struct InverseEllipseRequest : public DrawingRequestData
120 InverseEllipseRequest() :
129 struct DrawingRequest
136 DrawingEffect drawing_effect;
142 DrawingRequestData* request_data;
153 color(1.0f, 1.0f, 1.0f, 1.0f),
157 bool operator<(const DrawingRequest& other) const
159 return layer < other.layer;
163 struct GetLightRequest : public DrawingRequestData
165 GetLightRequest() : color_ptr() {}
170 GetLightRequest(const GetLightRequest&) = delete;
171 GetLightRequest& operator=(const GetLightRequest&) = delete;