Bug #: 4946
[WebKit-https.git] / WebCore / ksvg2 / ksvg.h
1 /*
2     Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
3                   2004, 2005 Rob Buis <buis@kde.org>
4
5     This file is part of the KDE project
6
7     This library is free software; you can redistribute it and/or
8     modify it under the terms of the GNU Library General Public
9     License as published by the Free Software Foundation; either
10     version 2 of the License, or (at your option) any later version.
11
12     This library is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15     Library General Public License for more details.
16
17     You should have received a copy of the GNU Library General Public License
18     along with this library; see the file COPYING.LIB.  If not, write to
19     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20     Boston, MA 02111-1307, USA.
21 */
22
23 #ifndef KSVG_H
24 #define KSVG_H
25
26 /**
27  * @short General namespace specific definitions.
28  */
29 namespace KSVG
30 {
31     /**
32      * All SVG constants
33      */
34     enum ExceptionCode
35     {
36         SVG_WRONG_TYPE_ERR            = 1,
37         SVG_INVALID_VALUE_ERR        = 2,
38         SVG_MATRIX_NOT_INVERTABLE    = 3
39     };
40
41     enum SVGLengthType
42     {
43         SVG_LENGTHTYPE_UNKNOWN        = 0,
44         SVG_LENGTHTYPE_NUMBER        = 1,
45         SVG_LENGTHTYPE_PERCENTAGE    = 2,
46         SVG_LENGTHTYPE_EMS            = 3,
47         SVG_LENGTHTYPE_EXS            = 4,
48         SVG_LENGTHTYPE_PX            = 5,
49         SVG_LENGTHTYPE_CM            = 6,
50         SVG_LENGTHTYPE_MM            = 7,
51         SVG_LENGTHTYPE_IN            = 8,
52         SVG_LENGTHTYPE_PT            = 9,
53         SVG_LENGTHTYPE_PC            = 10
54     };
55
56     enum SVGAngleType
57     {
58         SVG_ANGLETYPE_UNKNOWN        = 0,
59         SVG_ANGLETYPE_UNSPECIFIED    = 1,
60         SVG_ANGLETYPE_DEG            = 2,
61         SVG_ANGLETYPE_RAD            = 3,
62         SVG_ANGLETYPE_GRAD            = 4
63     };
64
65     enum SVGColorType
66     {
67         SVG_COLORTYPE_UNKNOWN                = 0,
68         SVG_COLORTYPE_RGBCOLOR                = 1,
69         SVG_COLORTYPE_RGBCOLOR_ICCCOLOR        = 2,
70         SVG_COLORTYPE_CURRENTCOLOR            = 3
71     };
72
73     enum SVGUnitTypes
74     {
75         SVG_UNIT_TYPE_UNKNOWN                = 0,
76         SVG_UNIT_TYPE_USERSPACEONUSE        = 1,
77         SVG_UNIT_TYPE_OBJECTBOUNDINGBOX        = 2
78     };
79
80     enum SVGRenderingIntentType
81     {
82         RENDERING_INTENT_UNKNOWN                = 0,
83         RENDERING_INTENT_AUTO                    = 1,
84         RENDERING_INTENT_PERCEPTUAL                = 2,
85         RENDERING_INTENT_RELATIVE_COLORIMETRIC    = 3,
86         RENDERING_INTENT_SATURATION                = 4,
87         RENDERING_INTENT_ABSOLUTE_COLORIMETRIC    = 5
88     };
89
90     enum SVGCSSRuleType
91     {
92         COLOR_PROFILE_RULE = 7
93     };
94
95     enum SVGTransformType
96     {
97         SVG_TRANSFORM_UNKNOWN        = 0,
98         SVG_TRANSFORM_MATRIX        = 1,
99         SVG_TRANSFORM_TRANSLATE        = 2,
100         SVG_TRANSFORM_SCALE            = 3,
101         SVG_TRANSFORM_ROTATE        = 4,
102         SVG_TRANSFORM_SKEWX            = 5,
103         SVG_TRANSFORM_SKEWY            = 6
104     };
105
106     enum SVGPreserveAspectRatioType
107     {
108         SVG_PRESERVEASPECTRATIO_UNKNOWN        = 0,
109         SVG_PRESERVEASPECTRATIO_NONE        = 1,
110         SVG_PRESERVEASPECTRATIO_XMINYMIN    = 2,
111         SVG_PRESERVEASPECTRATIO_XMIDYMIN    = 3,
112         SVG_PRESERVEASPECTRATIO_XMAXYMIN    = 4,
113         SVG_PRESERVEASPECTRATIO_XMINYMID    = 5,
114         SVG_PRESERVEASPECTRATIO_XMIDYMID    = 6,
115         SVG_PRESERVEASPECTRATIO_XMAXYMID    = 7,
116         SVG_PRESERVEASPECTRATIO_XMINYMAX    = 8,
117         SVG_PRESERVEASPECTRATIO_XMIDYMAX    = 9,
118         SVG_PRESERVEASPECTRATIO_XMAXYMAX    = 10
119     };
120
121     enum SVGMeetOrSliceType
122     {
123         SVG_MEETORSLICE_UNKNOWN    = 0,
124         SVG_MEETORSLICE_MEET    = 1,
125         SVG_MEETORSLICE_SLICE    = 2
126     };
127
128     enum SVGPathSegType
129     {
130         PATHSEG_UNKNOWN                            = 0,
131         PATHSEG_CLOSEPATH                        = 1,
132         PATHSEG_MOVETO_ABS                        = 2,
133         PATHSEG_MOVETO_REL                        = 3,
134         PATHSEG_LINETO_ABS                        = 4,
135         PATHSEG_LINETO_REL                        = 5,
136         PATHSEG_CURVETO_CUBIC_ABS                = 6,
137         PATHSEG_CURVETO_CUBIC_REL                = 7,
138         PATHSEG_CURVETO_QUADRATIC_ABS            = 8,
139         PATHSEG_CURVETO_QUADRATIC_REL            = 9,
140         PATHSEG_ARC_ABS                            = 10,
141         PATHSEG_ARC_REL                            = 11,
142         PATHSEG_LINETO_HORIZONTAL_ABS            = 12,
143         PATHSEG_LINETO_HORIZONTAL_REL            = 13,
144         PATHSEG_LINETO_VERTICAL_ABS                = 14,
145         PATHSEG_LINETO_VERTICAL_REL                = 15,
146         PATHSEG_CURVETO_CUBIC_SMOOTH_ABS        = 16,
147         PATHSEG_CURVETO_CUBIC_SMOOTH_REL        = 17,
148         PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS    = 18,
149         PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL    = 19
150     };
151
152     enum SVGLengthAdjustType
153     {
154         LENGTHADJUST_UNKNOWN            = 0,
155         LENGTHADJUST_SPACING            = 1,
156         LENGTHADJUST_SPACINGANDGLYPHS    = 2
157     };
158
159     enum SVGTextPathMethodType
160     {
161         TEXTPATH_METHODTYPE_UNKNOWN    = 0,
162         TEXTPATH_METHODTYPE_ALIGN    = 1,
163         TEXTPATH_METHODTYPE_STRETCH    = 2
164     };
165
166     enum SVGTextPathSpacingType
167     {
168         TEXTPATH_SPACINGTYPE_UNKNOWN    = 0,
169         TEXTPATH_SPACINGTYPE_AUTO        = 1,
170         TEXTPATH_SPACINGTYPE_EXACT        = 2
171     };
172
173     enum SVGPaintType
174     {
175         SVG_PAINTTYPE_UNKNOWN               = 0,
176         SVG_PAINTTYPE_RGBCOLOR              = 1,
177         SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR     = 2,
178         SVG_PAINTTYPE_NONE                  = 101,
179         SVG_PAINTTYPE_CURRENTCOLOR          = 102,
180         SVG_PAINTTYPE_URI_NONE              = 103,
181         SVG_PAINTTYPE_URI_CURRENTCOLOR      = 104,
182         SVG_PAINTTYPE_URI_RGBCOLOR          = 105,
183         SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106,
184         SVG_PAINTTYPE_URI                   = 107
185     };
186
187     enum SVGMarkerUnitsType
188     {
189         SVG_MARKERUNITS_UNKNOWN            = 0,
190         SVG_MARKERUNITS_USERSPACEONUSE    = 1,
191         SVG_MARKERUNITS_STROKEWIDTH        = 2
192     };
193
194     enum SVGMarkerOrientType
195     {
196         SVG_MARKER_ORIENT_UNKNOWN    = 0,
197         SVG_MARKER_ORIENT_AUTO        = 1,
198         SVG_MARKER_ORIENT_ANGLE        = 2
199     };
200
201     enum SVGGradientType
202     {
203         SVG_SPREADMETHOD_UNKNOWN = 0,
204         SVG_SPREADMETHOD_PAD     = 1,
205         SVG_SPREADMETHOD_REFLECT = 2,
206         SVG_SPREADMETHOD_REPEAT  = 3
207     };
208
209     enum SVGZoomAndPanType
210     {
211         SVG_ZOOMANDPAN_UNKNOWN = 0,
212         SVG_ZOOMANDPAN_DISABLE = 1,
213         SVG_ZOOMANDPAN_MAGNIFY = 2
214     };
215
216     enum SVGBlendModeType
217     {
218         SVG_FEBLEND_MODE_UNKNOWN  = 0,
219         SVG_FEBLEND_MODE_NORMAL   = 1,
220         SVG_FEBLEND_MODE_MULTIPLY = 2,
221         SVG_FEBLEND_MODE_SCREEN   = 3,
222         SVG_FEBLEND_MODE_DARKEN   = 4,
223         SVG_FEBLEND_MODE_LIGHTEN  = 5
224     };
225
226     enum SVGColorMatrixType
227     {
228         SVG_FECOLORMATRIX_TYPE_UNKNOWN          = 0,
229         SVG_FECOLORMATRIX_TYPE_MATRIX           = 1,
230         SVG_FECOLORMATRIX_TYPE_SATURATE         = 2,
231         SVG_FECOLORMATRIX_TYPE_HUEROTATE        = 3,
232         SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4
233     };
234
235     enum SVGComponentTransferType
236     {
237         SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN  = 0,
238         SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1,
239         SVG_FECOMPONENTTRANSFER_TYPE_TABLE    = 2,
240         SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3,
241         SVG_FECOMPONENTTRANSFER_TYPE_LINEAR   = 4,
242         SVG_FECOMPONENTTRANSFER_TYPE_GAMMA    = 5
243     };
244
245     enum SVGCompositeOperators
246     {
247         SVG_FECOMPOSITE_OPERATOR_UNKNOWN    = 0,
248         SVG_FECOMPOSITE_OPERATOR_OVER       = 1,
249         SVG_FECOMPOSITE_OPERATOR_IN         = 2,
250         SVG_FECOMPOSITE_OPERATOR_OUT        = 3,
251         SVG_FECOMPOSITE_OPERATOR_ATOP       = 4,
252         SVG_FECOMPOSITE_OPERATOR_XOR        = 5,
253         SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6
254     };
255
256     enum SVGEdgeModes
257     {
258         SVG_EDGEMODE_UNKNOWN   = 0,
259         SVG_EDGEMODE_DUPLICATE = 1,
260         SVG_EDGEMODE_WRAP      = 2,
261         SVG_EDGEMODE_NONE      = 3
262     };
263
264     enum SVGChannelSelectors
265     {
266         SVG_CHANNEL_UNKNOWN = 0,
267         SVG_CHANNEL_R       = 1,
268         SVG_CHANNEL_G       = 2,
269         SVG_CHANNEL_B       = 3,
270         SVG_CHANNEL_A       = 4
271     };
272
273     enum SVGMorphologyOperators
274     {
275         SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0,
276         SVG_MORPHOLOGY_OPERATOR_ERODE   = 1,
277         SVG_MORPHOLOGY_OPERATOR_DILATE  = 2
278     };
279
280     enum SVGTurbulenceType
281     {
282         SVG_TURBULENCE_TYPE_UNKNOWN      = 0,
283         SVG_TURBULENCE_TYPE_FRACTALNOISE = 1,
284         SVG_TURBULENCE_TYPE_TURBULENCE   = 2
285     };
286
287     enum SVGStitchOptions
288     {
289         SVG_STITCHTYPE_UNKNOWN  = 0,
290         SVG_STITCHTYPE_STITCH   = 1,
291         SVG_STITCHTYPE_NOSTITCH = 2
292     };
293 };
294
295 #endif
296
297 // vim:ts=4:noet