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/rectf.hpp"
27 #include "math/sizef.hpp"
28 #include "math/vector.hpp"
29 #include "video/color.hpp"
30 #include "video/drawing_context.hpp"
31 #include "video/font.hpp"
32 #include "video/glutil.hpp"
38 SURFACE, SURFACE_PART, TEXT, GRADIENT, FILLRECT, INVERSEELLIPSE, DRAW_LIGHTMAP, GETLIGHT
41 struct DrawingRequestData
43 virtual ~DrawingRequestData()
47 struct SurfaceRequest : public DrawingRequestData
53 const Surface* surface;
56 SurfaceRequest(const SurfaceRequest&) = delete;
57 SurfaceRequest& operator=(const SurfaceRequest&) = delete;
60 struct SurfacePartRequest : public DrawingRequestData
62 SurfacePartRequest() :
68 const Surface* surface;
73 SurfacePartRequest(const SurfacePartRequest&) = delete;
74 SurfacePartRequest& operator=(const SurfacePartRequest&) = delete;
77 struct TextRequest : public DrawingRequestData
87 FontAlignment alignment;
90 TextRequest(const TextRequest&);
91 TextRequest& operator=(const TextRequest&);
94 struct GradientRequest : public DrawingRequestData
107 struct FillRectRequest : public DrawingRequestData
120 struct InverseEllipseRequest : public DrawingRequestData
122 InverseEllipseRequest() :
131 struct DrawingRequest
138 DrawingEffect drawing_effect;
144 DrawingRequestData* request_data;
155 color(1.0f, 1.0f, 1.0f, 1.0f),
159 bool operator<(const DrawingRequest& other) const
161 return layer < other.layer;
165 struct GetLightRequest : public DrawingRequestData
167 GetLightRequest() : color_ptr() {}
172 GetLightRequest(const GetLightRequest&) = delete;
173 GetLightRequest& operator=(const GetLightRequest&) = delete;