1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
|
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef __SP_ATTRIBUTES_H__
#define __SP_ATTRIBUTES_H__
/** \file
* Lookup dictionary for attributes/properties.
*/
/*
* Author:
* Lauris Kaplinski <lauris@kaplinski.com>
*
* Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl>
* Copyright (C) 2002 Lauris Kaplinski
*
* Released under GNU GPL v2+, read the file 'COPYING' for more information.
*/
#include <glibmm/value.h>
#include <vector>
/*
* Do not change order of attributes and properties. Attribute and
* order in an SVG file is (optionally) determined by the order here.
* This makes comparing different versions of a drawing easier using
* line-by-line comparison. Also, inorder for proper parsing, some
* properties must be before others (e.g. 'font' before 'font-family').
*/
enum class SPAttr {
INVALID, ///< Must have value 0.
/* SPObject */
ID,
STYLE,
INKSCAPE_COLLECT,
INKSCAPE_LABEL,
/* SPRoot Put these near top as the apply to the entire SVG */
VERSION,
INKSCAPE_VERSION,
WIDTH,
HEIGHT,
VIEWBOX,
PRESERVEASPECTRATIO,
ONLOAD,
SODIPODI_DOCNAME,
/* SPItem */
TRANSFORM,
SODIPODI_TYPE,
SODIPODI_INSENSITIVE,
CONNECTOR_AVOID,
CONNECTION_POINTS,
TRANSFORM_CENTER_X,
TRANSFORM_CENTER_Y,
INKSCAPE_PATH_EFFECT,
INKSCAPE_HIGHLIGHT_COLOR,
INKSCAPE_SPRAY_ORIGIN,
/* SPAnchor */
XLINK_HREF,
XLINK_TYPE,
XLINK_ROLE,
XLINK_ARCROLE,
XLINK_TITLE,
XLINK_SHOW,
XLINK_ACTUATE,
TARGET,
/* SPGroup */
INKSCAPE_GROUPMODE,
INKSCAPE_EXPANDED,
/* SPNamedView */
VIEWONLY,
SHOWGUIDES,
SHOWGRIDS,
GRIDTOLERANCE,
GUIDETOLERANCE,
OBJECTTOLERANCE,
ALIGNMENTTOLERANCE,
DISTRIBUTIONTOLERANCE,
GUIDECOLOR,
GUIDEOPACITY,
GUIDEHICOLOR,
GUIDEHIOPACITY,
SHOWBORDER,
SHOWPAGESHADOW,
BORDERLAYER,
BORDERCOLOR,
BORDEROPACITY,
PAGECOLOR,
FIT_MARGIN_TOP,
FIT_MARGIN_LEFT,
FIT_MARGIN_RIGHT,
FIT_MARGIN_BOTTOM,
INKSCAPE_PAGEOPACITY,
INKSCAPE_PAGESHADOW,
INKSCAPE_ZOOM,
INKSCAPE_ROTATION,
INKSCAPE_CX,
INKSCAPE_CY,
INKSCAPE_WINDOW_WIDTH,
INKSCAPE_WINDOW_HEIGHT,
INKSCAPE_WINDOW_X,
INKSCAPE_WINDOW_Y,
INKSCAPE_WINDOW_MAXIMIZED,
// INKSCAPE_SNAP_GLOBAL,
// INKSCAPE_SNAP_DISTRIBUTION,
// INKSCAPE_SNAP_ALIGNMENT,
// INKSCAPE_SNAP_ALIGNMENT_SELF,
// INKSCAPE_SNAP_PERP,
// INKSCAPE_SNAP_TANG,
// INKSCAPE_SNAP_BBOX,
// INKSCAPE_SNAP_NODE,
// INKSCAPE_SNAP_OTHERS,
// INKSCAPE_SNAP_FROM_GUIDE,
// INKSCAPE_SNAP_ROTATION_CENTER,
// INKSCAPE_SNAP_GRID,
// INKSCAPE_SNAP_GUIDE,
// INKSCAPE_SNAP_NODE_SMOOTH,
// INKSCAPE_SNAP_LINE_MIDPOINT,
// INKSCAPE_SNAP_OBJECT_MIDPOINT,
// INKSCAPE_SNAP_TEXT_BASELINE,
// INKSCAPE_SNAP_BBOX_EDGE_MIDPOINT,
// INKSCAPE_SNAP_BBOX_MIDPOINT,
// INKSCAPE_SNAP_PATH_INTERSECTION,
// INKSCAPE_SNAP_PATH,
// INKSCAPE_SNAP_PATH_CLIP,
// INKSCAPE_SNAP_PATH_MASK,
// INKSCAPE_SNAP_NODE_CUSP,
// INKSCAPE_SNAP_BBOX_EDGE,
// INKSCAPE_SNAP_BBOX_CORNER,
// INKSCAPE_SNAP_PAGE_BORDER,
INKSCAPE_CURRENT_LAYER,
INKSCAPE_DOCUMENT_UNITS,
INKSCAPE_LOCKGUIDES,
UNITS,
/* SPColorProfile */
LOCAL,
NAME,
RENDERING_INTENT,
/* SPGuide */
ORIENTATION,
POSITION,
INKSCAPE_COLOR,
INKSCAPE_LOCKED,
/* SPImage, SPRect, etc. */
X,
Y,
SVG_DPI,
/* SPPath */
// D, Promoted to property in SVG 2
INKSCAPE_ORIGINAL_D,
CONNECTOR_TYPE,
CONNECTOR_CURVATURE,
INKSCAPE_CONNECTOR_SPACING,
CONNECTION_START,
CONNECTION_END,
CONNECTION_START_POINT,
CONNECTION_END_POINT,
/* SPRect */
RX,
RY,
/* Box3D */
INKSCAPE_BOX3D_PERSPECTIVE_ID,
INKSCAPE_BOX3D_CORNER0, // "upper left front" corner (as a point in 3-space)
INKSCAPE_BOX3D_CORNER7, // "lower right rear" corner (as a point in 3-space)
/* Box3DSide */
INKSCAPE_BOX3D_SIDE_TYPE,
/* Persp3D */
INKSCAPE_PERSP3D,
INKSCAPE_PERSP3D_VP_X,
INKSCAPE_PERSP3D_VP_Y,
INKSCAPE_PERSP3D_VP_Z,
INKSCAPE_PERSP3D_ORIGIN,
/* SPEllipse */
R,
CX,
CY,
SODIPODI_CX,
SODIPODI_CY,
SODIPODI_RX,
SODIPODI_RY,
SODIPODI_START,
SODIPODI_END,
SODIPODI_OPEN,
SODIPODI_ARC_TYPE,
/* SPStar */
SODIPODI_SIDES,
SODIPODI_R1,
SODIPODI_R2,
SODIPODI_ARG1,
SODIPODI_ARG2,
INKSCAPE_FLATSIDED,
INKSCAPE_ROUNDED,
INKSCAPE_RANDOMIZED,
/* SPSpiral */
SODIPODI_EXPANSION,
SODIPODI_REVOLUTION,
SODIPODI_RADIUS,
SODIPODI_ARGUMENT,
SODIPODI_T0,
/* SPOffset */
SODIPODI_ORIGINAL,
INKSCAPE_ORIGINAL,
INKSCAPE_HREF,
INKSCAPE_RADIUS,
/* SPLine */
X1,
Y1,
X2,
Y2,
/* SPPolyline */
POINTS,
/* SPTSpan */
DX,
DY,
ROTATE,
TEXTLENGTH,
LENGTHADJUST,
SODIPODI_ROLE,
/* SPText */
SODIPODI_LINESPACING,
/* SPTextPath */
STARTOFFSET,
SIDE,
/* SPStop */
OFFSET,
/* SPFilter */
FILTERUNITS,
PRIMITIVEUNITS,
FILTERRES,
/* Filter primitives common */
IN_,
RESULT,
/*feBlend*/
MODE,
IN2,
/*feColorMatrix*/
TYPE,
VALUES,
/*feComponentTransfer*/
//TYPE,
TABLEVALUES,
SLOPE,
INTERCEPT,
AMPLITUDE,
EXPONENT,
//OFFSET,
/*feComposite*/
OPERATOR,
K1,
K2,
K3,
K4,
//IN2,
/*feConvolveMatrix*/
ORDER,
KERNELMATRIX,
DIVISOR,
BIAS,
TARGETX,
TARGETY,
EDGEMODE,
KERNELUNITLENGTH,
PRESERVEALPHA,
/*feDiffuseLighting*/
SURFACESCALE,
DIFFUSECONSTANT,
//KERNELUNITLENGTH,
/*feDisplacementMap*/
SCALE,
XCHANNELSELECTOR,
YCHANNELSELECTOR,
//IN2,
/*feDistantLight*/
AZIMUTH,
ELEVATION,
/*fePointLight*/
Z,
/*feSpotLight*/
POINTSATX,
POINTSATY,
POINTSATZ,
LIMITINGCONEANGLE,
/* SPGaussianBlur */
STDDEVIATION,
/*feImage*/
/*feMerge*/
/*feMorphology*/
//OPERATOR,
RADIUS,
/*feOffset*/
//DX,
//DY,
/*feSpecularLighting*/
//SURFACESCALE,
SPECULARCONSTANT,
SPECULAREXPONENT,
/*feTile*/
/*feTurbulence*/
BASEFREQUENCY,
NUMOCTAVES,
SEED,
STITCHTILES,
//TYPE,
/* SPGradient */
GRADIENTUNITS,
GRADIENTTRANSFORM,
SPREADMETHOD,
INKSCAPE_SWATCH,
/* SPRadialGradient */
FX,
FY,
FR,
/* SPMeshPatch */
TENSOR,
//TYPE,
/* SPPattern */
PATTERNUNITS,
PATTERNCONTENTUNITS,
PATTERNTRANSFORM,
/* SPHatch */
HATCHUNITS,
HATCHCONTENTUNITS,
HATCHTRANSFORM,
PITCH,
/* SPClipPath */
CLIPPATHUNITS,
/* SPMask */
MASKUNITS,
MASKCONTENTUNITS,
/* SPMarker */
MARKERUNITS,
REFX,
REFY,
MARKERWIDTH,
MARKERHEIGHT,
ORIENT,
/* SPStyleElem */
//TYPE,
/* Animations */
ATTRIBUTENAME,
ATTRIBUTETYPE,
BEGIN,
DUR,
END,
MIN,
MAX,
RESTART,
REPEATCOUNT,
REPEATDUR,
/* Interpolating animations */
CALCMODE,
//VALUES,
KEYTIMES,
KEYSPLINES,
FROM,
TO,
BY,
ADDITIVE,
ACCUMULATE,
/* SVGFonts */
/* SPFont */
HORIZ_ORIGIN_X,
HORIZ_ORIGIN_Y,
HORIZ_ADV_X,
VERT_ORIGIN_X,
VERT_ORIGIN_Y,
VERT_ADV_Y,
UNICODE,
GLYPH_NAME,
//ORIENTATION,
ARABIC_FORM,
LANG,
/*<hkern> and <vkern>*/
U1,
G1,
U2,
G2,
K,
/*<font-face>*/
// FONT_FAMILY,
// FONT_STYLE,
// FONT_VARIANT,
// FONT_WEIGHT,
// FONT_STRETCH,
// FONT_SIZE,
UNICODE_RANGE,
UNITS_PER_EM,
PANOSE_1,
STEMV,
STEMH,
//SLOPE,
CAP_HEIGHT,
X_HEIGHT,
ACCENT_HEIGHT,
ASCENT,
DESCENT,
WIDTHS,
BBOX,
IDEOGRAPHIC,
ALPHABETIC,
MATHEMATICAL,
HANGING,
V_IDEOGRAPHIC,
V_ALPHABETIC,
V_MATHEMATICAL,
V_HANGING,
UNDERLINE_POSITION,
UNDERLINE_THICKNESS,
STRIKETHROUGH_POSITION,
STRIKETHROUGH_THICKNESS,
OVERLINE_POSITION,
OVERLINE_THICKNESS,
/* XML */
XML_SPACE,
XML_LANG,
/* typeset */
TEXT_NOMARKUP,
TEXT_PANGOMARKUP,
TEXT_INSHAPE,
TEXT_ONPATH,
TEXT_INBOX,
TEXT_INCOLUMN,
TEXT_EXCLUDE,
LAYOUT_OPTIONS,
/* CSS & SVG Properties KEEP ORDER!
* If first or last property changed, macro at top must be changed!
*/
/* SVG 2 Attributes promoted to properties */
D,
/* Paint */
COLOR,
OPACITY,
FILL,
FILL_OPACITY,
FILL_RULE,
STROKE,
STROKE_OPACITY,
STROKE_WIDTH,
STROKE_LINECAP,
STROKE_LINEJOIN,
STROKE_MITERLIMIT,
STROKE_DASHARRAY,
STROKE_DASHOFFSET,
STROKE_EXTENSIONS,
MARKER,
MARKER_END,
MARKER_MID,
MARKER_START,
PAINT_ORDER, /* SVG2 */
SOLID_COLOR,
SOLID_OPACITY,
VECTOR_EFFECT,
/* CSS Blending/Compositing */
MIX_BLEND_MODE,
ISOLATION,
/* Misc. Display */
DISPLAY,
OVERFLOW_,
VISIBILITY,
/* Clip/Mask */
CLIP,
CLIP_PATH,
CLIP_RULE,
MASK,
/* Font: Order is important! */
FONT,
FONT_FAMILY,
INKSCAPE_FONT_SPEC, // Remove me
FONT_SIZE,
FONT_SIZE_ADJUST,
FONT_STRETCH,
FONT_STYLE,
FONT_VARIANT,
FONT_WEIGHT,
/* Font Variants CSS 3 */
FONT_VARIANT_LIGATURES,
FONT_VARIANT_POSITION,
FONT_VARIANT_CAPS,
FONT_VARIANT_NUMERIC,
FONT_VARIANT_ALTERNATES,
FONT_VARIANT_EAST_ASIAN,
FONT_FEATURE_SETTINGS,
/* Variable Fonts (CSS Fonts Module Level 4) */
FONT_VARIATION_SETTINGS,
/* Text Layout */
TEXT_INDENT,
TEXT_ALIGN,
LINE_HEIGHT,
LETTER_SPACING,
WORD_SPACING,
TEXT_TRANSFORM,
/* Text (CSS3) */
DIRECTION,
WRITING_MODE,
TEXT_ORIENTATION,
UNICODE_BIDI,
ALIGNMENT_BASELINE,
BASELINE_SHIFT,
DOMINANT_BASELINE,
GLYPH_ORIENTATION_HORIZONTAL,
GLYPH_ORIENTATION_VERTICAL,
KERNING,
TEXT_ANCHOR,
WHITE_SPACE,
/* SVG 2 Text Wrapping */
SHAPE_INSIDE,
SHAPE_SUBTRACT,
SHAPE_PADDING,
SHAPE_MARGIN,
INLINE_SIZE,
/* Text Decoration */
TEXT_DECORATION, // CSS 2/CSS3-Shorthand
TEXT_DECORATION_LINE,
TEXT_DECORATION_STYLE,
TEXT_DECORATION_COLOR,
TEXT_DECORATION_FILL,
TEXT_DECORATION_STROKE,
/* Filter */
ENABLE_BACKGROUND,
FILTER,
FLOOD_COLOR,
FLOOD_OPACITY,
LIGHTING_COLOR,
AUTO_REGION,
/* Gradient */
STOP_COLOR,
STOP_OPACITY,
STOP_PATH,
/* Rendering */
COLOR_INTERPOLATION,
COLOR_INTERPOLATION_FILTERS,
COLOR_PROFILE,
COLOR_RENDERING,
IMAGE_RENDERING,
SHAPE_RENDERING,
TEXT_RENDERING,
/* Interactivity */
POINTER_EVENTS,
CURSOR,
/* Conditional */
SYSTEM_LANGUAGE,
REQUIRED_FEATURES,
REQUIRED_EXTENSIONS,
/* LivePathEffect */
PATH_EFFECT,
// canvas blackout color
INKSCAPE_DESK_COLOR,
INKSCAPE_DESK_OPACITY,
INKSCAPE_DESK_CHECKERBOARD,
// sentinel
SPAttr_SIZE
};
/**
* True iff k is a property in SVG, i.e. something that can be written either in a style attribute
* or as its own XML attribute. This must be kept in sync with SPAttr.
*/
bool SP_ATTRIBUTE_IS_CSS(SPAttr k);
/**
* Get attribute id by name. Return INVALID for invalid names.
*/
SPAttr sp_attribute_lookup(gchar const *key);
/**
* Get attribute name by id. Return NULL for invalid ids.
*/
gchar const *sp_attribute_name(SPAttr id);
/**
* Get sorted attribute name list.
* @param css_only If true, only return CSS properties
*/
std::vector<Glib::ustring> sp_attribute_name_list(bool css_only = false);
#endif
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
|