NetSurf
frontends
amiga
iff_dr2d.h
Go to the documentation of this file.
1
/*
2
* Copyright 2009 Chris Young <chris@unsatisfactorysoftware.co.uk>
3
*
4
* This file is part of NetSurf, http://www.netsurf-browser.org/
5
*
6
* NetSurf is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 2 of the License.
9
*
10
* NetSurf 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
19
#ifdef WITH_NS_SVG
20
#ifndef AMIGA_IFF_DR2D_H
21
#define AMIGA_IFF_DR2D_H
22
#include <proto/iffparse.h>
23
#include <datatypes/pictureclass.h>
24
#include <stdbool.h>
25
#ifndef AMIGA_DR2D_STANDALONE
26
#include "
content/content.h
"
27
#include "
amiga/download.h
"
28
#endif
29
30
#define ID_DR2D MAKE_ID('D','R','2','D')
31
#define ID_DRHD MAKE_ID('D','R','H','D')
32
#define ID_ATTR MAKE_ID('A','T','T','R')
33
#define ID_CPLY MAKE_ID('C','P','L','Y')
34
#define ID_OPLY MAKE_ID('O','P','L','Y')
35
#define ID_STXT MAKE_ID('S','T','X','T')
36
#define ID_DASH MAKE_ID('D','A','S','H')
37
//#define ID_CMAP MAKE_ID('C','M','A','P') in dt/pictureclass
38
//#define ID_NAME MAKE_ID('N','A','M','E') in dt/datatypes
39
#define ID_ANNO MAKE_ID('A','N','N','O')
40
#define ID_FONS MAKE_ID('F','O','N','S')
41
42
struct
drhd_struct {
43
float
XLeft, YTop, XRight, YBot;
44
};
45
46
struct
poly_struct {
47
USHORT NumPoints;
48
// float PolyPoints[]; // 2*numpoints
49
};
50
51
#define INDICATOR 0xFFFFFFFF
52
#define IND_SPLINE 0x00000001
53
#define IND_MOVETO 0x00000002
54
#define IND_CURVE 0x00000001
55
56
struct
fons_struct {
57
UBYTE FontID;
/* ID the font is referenced by */
58
UBYTE Pad1;
/* Always 0 */
59
UBYTE Proportional;
/* Is it proportional? */
60
UBYTE Serif;
/* does it have serifs? */
61
};
62
63
struct
stxt_struct {
64
UBYTE Pad0;
/* Always 0 (for future expansion) */
65
UBYTE WhichFont;
/* Which font to use */
66
float
CharW, CharH,
/* W/H of an individual char */
67
BaseX, BaseY,
/* Start of baseline */
68
Rotation;
/* Angle of text (in degrees) */
69
uint16_t NumChars;
70
//char TextChars[NumChars];
71
};
72
73
/* Various fill types */
74
#define FT_NONE 0
/* No fill */
75
#define FT_COLOR 1
/* Fill with color from palette */
76
#define FT_OBJECTS 2
/* Fill with tiled objects */
77
78
struct
attr_struct {
79
UBYTE FillType;
/* One of FT_*, above */
80
UBYTE JoinType;
/* One of JT_*, below */
81
UBYTE DashPattern;
/* ID of edge dash pattern */
82
UBYTE ArrowHead;
/* ID of arrowhead to use */
83
USHORT FillValue;
/* Color or object with which to fill */
84
USHORT EdgeValue;
/* Edge color index */
85
USHORT WhichLayer;
/* ID of layer it's in */
86
float
EdgeThick;
/* Line width */
87
};
88
89
/* Join types */
90
#define JT_NONE 0
/* Don't do line joins */
91
#define JT_MITER 1
/* Mitered join */
92
#define JT_BEVEL 2
/* Beveled join */
93
#define JT_ROUND 3
/* Round join */
94
95
struct
dash_struct {
96
USHORT DashID;
/* ID of the dash pattern */
97
USHORT NumDashes;
/* Should always be even */
98
// IEEE Dashes[NumDashes]; /* On-off pattern */
99
};
100
101
bool
ami_svg_to_dr2d(
struct
IFFHandle *
iffh
,
const
char
*
buffer
,
102
uint32_t size,
const
char
*url);
103
#ifndef AMIGA_DR2D_STANDALONE
104
bool
ami_save_svg(
struct
hlcache_handle
*c,
char
*filename);
105
#endif
106
#endif
// AMIGA_IFF_DR2D_H
107
#endif
// WITH_NS_SVG
iffh
static struct IFFHandle * iffh
Definition:
clipboard.c:53
buffer
static osspriteop_area * buffer
The buffer characteristics.
Definition:
buffer.c:55
content.h
Content handling interface.
download.h
hlcache_handle
High-level cache handle.
Definition:
hlcache.c:66
Generated on Tue Nov 12 2024 23:39:50 for NetSurf by
1.9.4