1 /** @file api_svg.h Scalable Vector Graphics (SVG).
2 * @ingroup gl
3 *
4 * @authors Copyright © 2003-2017 Jaakko Keränen <jaakko.keranen@iki.fi>
5 * @authors Copyright © 2006-2013 Daniel Swanson <danij@dengine.net>
6 *
7 * @par License
8 * GPL: http://www.gnu.org/licenses/gpl.html
9 *
10 * <small>This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version. This program is distributed in the hope that it
14 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16 * Public License for more details. You should have received a copy of the GNU
17 * General Public License along with this program; if not, write to the Free
18 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19 * 02110-1301 USA</small>
20 */
21
22 #ifndef DOOMSDAY_API_VECTORGRAPHIC_H
23 #define DOOMSDAY_API_VECTORGRAPHIC_H
24
25 #include <de/point.h>
26 #include "apis.h"
27
28 typedef uint32_t svgid_t;
29
30 typedef struct def_svgline_s {
31 uint numPoints;
32 const Point2Rawf* points;
33 } def_svgline_t;
34
DENG_API_TYPEDEF(Svg)35 DENG_API_TYPEDEF(Svg)
36 {
37 de_api_t api;
38 void (*NewSvg)(svgid_t svgId, const def_svgline_t* lines, uint numLines);
39 void (*DrawSvg)(svgid_t svgId, const Point2Rawf* origin);
40 void (*DrawSvg2)(svgid_t svgId, const Point2Rawf* origin, float scale);
41 void (*DrawSvg3)(svgid_t svgId, const Point2Rawf* origin, float scale, float angle);
42 }
43 DENG_API_T(Svg);
44
45 #ifndef DENG_NO_API_MACROS_SVG
46 #define R_NewSvg _api_Svg.NewSvg
47 #define GL_DrawSvg _api_Svg.DrawSvg
48 #define GL_DrawSvg2 _api_Svg.DrawSvg2
49 #define GL_DrawSvg3 _api_Svg.DrawSvg3
50 #endif
51
52 #if defined __DOOMSDAY__ && defined __CLIENT__
53 DENG_USING_API(Svg);
54 #endif
55
56 #endif /* DOOMSDAY_API_VECTORGRAPHIC_H */
57