diff --git a/src/attributes.cpp b/src/attributes.cpp
index f0ecc1e415ed13bccc0ac252997375062732699e..118a9048274626bd12385a06932076f6236df2d8 100644 (file)
--- a/src/attributes.cpp
+++ b/src/attributes.cpp
* Author:
* Lauris Kaplinski <lauris@kaplinski.com>
*
+ * Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl>
* Copyright (C) 2002 Lauris Kaplinski
*
* Released under GNU GPL, read the file 'COPYING' for more information
# include "config.h"
#endif
+#include <glib.h> // g_assert()
#include <glib/ghash.h>
#include "attributes.h"
{SP_ATTR_SODIPODI_INSENSITIVE, "sodipodi:insensitive"},
{SP_ATTR_SODIPODI_NONPRINTABLE, "sodipodi:nonprintable"},
{SP_ATTR_CONNECTOR_AVOID, "inkscape:connector-avoid"},
+ {SP_ATTR_CONNECTION_POINTS, "inkscape:connection-points"},
{SP_ATTR_STYLE, "style"},
{SP_ATTR_TRANSFORM_CENTER_X, "inkscape:transform-center-x"},
{SP_ATTR_TRANSFORM_CENTER_Y, "inkscape:transform-center-y"},
+ {SP_ATTR_INKSCAPE_PATH_EFFECT, "inkscape:path-effect"},
/* SPAnchor */
{SP_ATTR_XLINK_HREF, "xlink:href"},
{SP_ATTR_XLINK_TYPE, "xlink:type"},
{SP_ATTR_HEIGHT, "height"},
{SP_ATTR_VIEWBOX, "viewBox"},
{SP_ATTR_PRESERVEASPECTRATIO, "preserveAspectRatio"},
- {SP_ATTR_SODIPODI_VERSION, "sodipodi:version"},
{SP_ATTR_INKSCAPE_VERSION, "inkscape:version"},
+ {SP_ATTR_ONLOAD, "onload"},
/* SPNamedView */
{SP_ATTR_VIEWONLY, "viewonly"},
- {SP_ATTR_SHOWGRID, "showgrid"},
{SP_ATTR_SHOWGUIDES, "showguides"},
+ {SP_ATTR_SHOWGRIDS, "showgrid"},
{SP_ATTR_GRIDTOLERANCE, "gridtolerance"},
{SP_ATTR_GUIDETOLERANCE, "guidetolerance"},
{SP_ATTR_OBJECTTOLERANCE, "objecttolerance"},
- {SP_ATTR_ABS_TOLERANCE, "has_abs_tolerance"},
- {SP_ATTR_GRIDORIGINX, "gridoriginx"},
- {SP_ATTR_GRIDORIGINY, "gridoriginy"},
- {SP_ATTR_GRIDSPACINGX, "gridspacingx"},
- {SP_ATTR_GRIDSPACINGY, "gridspacingy"},
- {SP_ATTR_GRIDCOLOR, "gridcolor"},
- {SP_ATTR_GRIDOPACITY, "gridopacity"},
- {SP_ATTR_GRIDEMPCOLOR, "gridempcolor"},
- {SP_ATTR_GRIDEMPOPACITY, "gridempopacity"},
- {SP_ATTR_GRIDEMPSPACING, "gridempspacing"},
{SP_ATTR_GUIDECOLOR, "guidecolor"},
{SP_ATTR_GUIDEOPACITY, "guideopacity"},
{SP_ATTR_GUIDEHICOLOR, "guidehicolor"},
{SP_ATTR_BORDERCOLOR, "bordercolor"},
{SP_ATTR_BORDEROPACITY, "borderopacity"},
{SP_ATTR_PAGECOLOR, "pagecolor"},
+ {SP_ATTR_FIT_MARGIN_TOP, "fit-margin-top"},
+ {SP_ATTR_FIT_MARGIN_LEFT, "fit-margin-left"},
+ {SP_ATTR_FIT_MARGIN_RIGHT, "fit-margin-right"},
+ {SP_ATTR_FIT_MARGIN_BOTTOM, "fit-margin-bottom"},
{SP_ATTR_INKSCAPE_PAGEOPACITY, "inkscape:pageopacity"},
{SP_ATTR_INKSCAPE_PAGESHADOW, "inkscape:pageshadow"},
{SP_ATTR_INKSCAPE_ZOOM, "inkscape:zoom"},
{SP_ATTR_INKSCAPE_WINDOW_HEIGHT, "inkscape:window-height"},
{SP_ATTR_INKSCAPE_WINDOW_X, "inkscape:window-x"},
{SP_ATTR_INKSCAPE_WINDOW_Y, "inkscape:window-y"},
- {SP_ATTR_INKSCAPE_GRID_BBOX, "inkscape:grid-bbox"},
- {SP_ATTR_INKSCAPE_GUIDE_BBOX, "inkscape:guide-bbox"},
- {SP_ATTR_INKSCAPE_OBJECT_BBOX, "inkscape:object-bbox"},
- {SP_ATTR_INKSCAPE_GRID_POINTS, "inkscape:grid-points"},
- {SP_ATTR_INKSCAPE_GUIDE_POINTS, "inkscape:guide-points"},
- {SP_ATTR_INKSCAPE_OBJECT_POINTS, "inkscape:object-points"},
+ {SP_ATTR_INKSCAPE_WINDOW_MAXIMIZED, "inkscape:window-maximized"},
+ {SP_ATTR_INKSCAPE_SNAP_GLOBAL, "inkscape:snap-global"},
+ {SP_ATTR_INKSCAPE_SNAP_BBOX, "inkscape:snap-bbox"},
+ {SP_ATTR_INKSCAPE_SNAP_NODES, "inkscape:snap-nodes"},
+ {SP_ATTR_INKSCAPE_SNAP_FROM_GUIDE, "inkscape:snap-from-guide"},
+ {SP_ATTR_INKSCAPE_SNAP_CENTER, "inkscape:snap-center"},
+ {SP_ATTR_INKSCAPE_SNAP_GRIDS, "inkscape:snap-grids"},
+ {SP_ATTR_INKSCAPE_SNAP_TO_GUIDES, "inkscape:snap-to-guides"},
+ {SP_ATTR_INKSCAPE_SNAP_SMOOTH_NODES, "inkscape:snap-smooth-nodes"},
+ {SP_ATTR_INKSCAPE_SNAP_LINE_MIDPOINTS, "inkscape:snap-midpoints"},
+ {SP_ATTR_INKSCAPE_SNAP_OBJECT_MIDPOINTS, "inkscape:snap-object-midpoints"},
+ {SP_ATTR_INKSCAPE_SNAP_BBOX_EDGE_MIDPOINTS, "inkscape:snap-bbox-edge-midpoints"},
+ {SP_ATTR_INKSCAPE_SNAP_BBOX_MIDPOINTS, "inkscape:snap-bbox-midpoints"},
+ {SP_ATTR_INKSCAPE_SNAP_INTERS_PATHS, "inkscape:snap-intersection-paths"},
{SP_ATTR_INKSCAPE_OBJECT_PATHS, "inkscape:object-paths"},
{SP_ATTR_INKSCAPE_OBJECT_NODES, "inkscape:object-nodes"},
+ {SP_ATTR_INKSCAPE_BBOX_PATHS, "inkscape:bbox-paths"},
+ {SP_ATTR_INKSCAPE_BBOX_NODES, "inkscape:bbox-nodes"},
+ {SP_ATTR_INKSCAPE_SNAP_PAGE, "inkscape:snap-page"},
{SP_ATTR_INKSCAPE_CURRENT_LAYER, "inkscape:current-layer"},
{SP_ATTR_INKSCAPE_DOCUMENT_UNITS, "inkscape:document-units"},
+ {SP_ATTR_UNITS, "units"},
{SP_ATTR_INKSCAPE_CONNECTOR_SPACING, "inkscape:connector-spacing"},
/* SPColorProfile */
{SP_ATTR_LOCAL, "local"},
{SP_ATTR_Y, "y"},
/* SPPath */
{SP_ATTR_D, "d"},
+ {SP_ATTR_INKSCAPE_ORIGINAL_D, "inkscape:original-d"},
/* (Note: XML representation of connectors may change in future.) */
{SP_ATTR_CONNECTOR_TYPE, "inkscape:connector-type"},
+ {SP_ATTR_CONNECTOR_CURVATURE, "inkscape:connector-curvature"},
{SP_ATTR_CONNECTION_START, "inkscape:connection-start"},
{SP_ATTR_CONNECTION_END, "inkscape:connection-end"},
+ {SP_ATTR_CONNECTION_START_POINT, "inkscape:connection-start-point"},
+ {SP_ATTR_CONNECTION_END_POINT, "inkscape:connection-end-point"},
/* SPRect */
{SP_ATTR_RX, "rx"},
{SP_ATTR_RY, "ry"},
+ /* Box3D */
+ {SP_ATTR_INKSCAPE_BOX3D_PERSPECTIVE_ID, "inkscape:perspectiveID"},
+ {SP_ATTR_INKSCAPE_BOX3D_CORNER0, "inkscape:corner0"},
+ {SP_ATTR_INKSCAPE_BOX3D_CORNER7, "inkscape:corner7"},
+ /* Box3DSide */
+ {SP_ATTR_INKSCAPE_BOX3D_SIDE_TYPE, "inkscape:box3dsidetype"}, // XYfront, etc.
+ /* Persp3D */
+ {SP_ATTR_INKSCAPE_PERSP3D, "inkscape:persp3d"},
+ {SP_ATTR_INKSCAPE_PERSP3D_VP_X, "inkscape:vp_x"},
+ {SP_ATTR_INKSCAPE_PERSP3D_VP_Y, "inkscape:vp_y"},
+ {SP_ATTR_INKSCAPE_PERSP3D_VP_Z, "inkscape:vp_z"},
+ {SP_ATTR_INKSCAPE_PERSP3D_ORIGIN, "inkscape:persp3d-origin"},
/* SPEllipse */
{SP_ATTR_R, "r"},
{SP_ATTR_CX, "cx"},
{SP_ATTR_FILTERUNITS, "filterUnits"},
{SP_ATTR_PRIMITIVEUNITS, "primitiveUnits"},
{SP_ATTR_FILTERRES, "filterRes"},
+ /* Filter primitives common */
+ {SP_ATTR_IN, "in"},
+ {SP_ATTR_RESULT, "result"},
+ /*feBlend*/
+ {SP_ATTR_MODE, "mode"},
+ {SP_ATTR_IN2, "in2"},
+ /*feColorMatrix*/
+ {SP_ATTR_TYPE, "type"},
+ {SP_ATTR_VALUES, "values"},
+ /*feComponentTransfer*/
+ //{SP_ATTR_TYPE, "type"},
+ {SP_ATTR_TABLEVALUES, "tableValues"},
+ {SP_ATTR_SLOPE, "slope"},
+ {SP_ATTR_INTERCEPT, "intercept"},
+ {SP_ATTR_AMPLITUDE, "amplitude"},
+ {SP_ATTR_EXPONENT, "exponent"},
+ //{SP_ATTR_OFFSET, "offset"},
+ /*feComposite*/
+ {SP_ATTR_OPERATOR, "operator"},
+ {SP_ATTR_K1, "k1"},
+ {SP_ATTR_K2, "k2"},
+ {SP_ATTR_K3, "k3"},
+ {SP_ATTR_K4, "k4"},
+ //{SP_ATTR_IN2, "in2"},
+ /*feConvolveMatrix*/
+ {SP_ATTR_ORDER, "order"},
+ {SP_ATTR_KERNELMATRIX, "kernelMatrix"},
+ {SP_ATTR_DIVISOR, "divisor"},
+ {SP_ATTR_BIAS, "bias"},
+ {SP_ATTR_TARGETX, "targetX"},
+ {SP_ATTR_TARGETY, "targetY"},
+ {SP_ATTR_EDGEMODE, "edgeMode"},
+ {SP_ATTR_KERNELUNITLENGTH, "kernelUnitLength"},
+ {SP_ATTR_PRESERVEALPHA, "preserveAlpha"},
+ /*feDiffuseLighting*/
+ {SP_ATTR_SURFACESCALE, "surfaceScale"},
+ {SP_ATTR_DIFFUSECONSTANT, "diffuseConstant"},
+ //{SP_ATTR_KERNELUNITLENGTH, "kernelUnitLength"},
+ /*feDisplacementMap*/
+ {SP_ATTR_SCALE, "scale"},
+ {SP_ATTR_XCHANNELSELECTOR, "xChannelSelector"},
+ {SP_ATTR_YCHANNELSELECTOR, "yChannelSelector"},
+ //{SP_ATTR_IN2, "in2"},
+ /*feDistantLight*/
+ {SP_ATTR_AZIMUTH, "azimuth"},
+ {SP_ATTR_ELEVATION, "elevation"},
+ /*fePointLight*/
+ {SP_ATTR_Z, "z"},
+ /*feSpotLight*/
+ {SP_ATTR_POINTSATX, "pointsAtX"},
+ {SP_ATTR_POINTSATY, "pointsAtY"},
+ {SP_ATTR_POINTSATZ, "pointsAtZ"},
+ {SP_ATTR_LIMITINGCONEANGLE, "limitingConeAngle"},
+ /*feFlood*/
+ {SP_ATTR_FLOODCOLOR, "flood-color"},
+ {SP_ATTR_FLOODOPACITY, "flood-opacity"},
/* SPGaussianBlur */
{SP_ATTR_STDDEVIATION, "stdDeviation"},
+ /*feImage*/
+ /*feMerge*/
+ /*feMorphology*/
+ //{SP_ATTR_OPERATOR, "operator"},
+ {SP_ATTR_RADIUS, "radius"},
+ /*feOffset*/
+ //{SP_ATTR_DX, "dx"},
+ //{SP_ATTR_DY, "dy"},
+ /*feSpecularLighting*/
+ {SP_ATTR_SPECULARCONSTANT, "specularConstant"},
+ {SP_ATTR_SPECULAREXPONENT, "specularExponent"},
+ /*feTile*/
+ /*feTurbulence*/
+ {SP_ATTR_BASEFREQUENCY, "baseFrequency"},
+ {SP_ATTR_NUMOCTAVES, "numOctaves"},
+ {SP_ATTR_SEED, "seed"},
+ {SP_ATTR_STITCHTILES, "stitchTiles"},
+ //{SP_ATTR_TYPE, "type"},
/* SPGradient */
{SP_ATTR_GRADIENTUNITS, "gradientUnits"},
{SP_ATTR_GRADIENTTRANSFORM, "gradientTransform"},
{SP_ATTR_SPREADMETHOD, "spreadMethod"},
+ {SP_ATTR_OSB_SWATCH, "osb:paint"},
/* SPRadialGradient */
{SP_ATTR_FX, "fx"},
{SP_ATTR_FY, "fy"},
{SP_ATTR_MARKERHEIGHT, "markerHeight"},
{SP_ATTR_ORIENT, "orient"},
/* SPStyleElem */
- {SP_ATTR_TYPE, "type"},
+ //{SP_ATTR_TYPE, "type"},
/* Animations */
{SP_ATTR_ATTRIBUTENAME, "attributeName"},
{SP_ATTR_ATTRIBUTETYPE, "attributeType"},
{SP_ATTR_REPEATDUR, "repeatDur"},
/* Interpolating animations */
{SP_ATTR_CALCMODE, "calcMode"},
- {SP_ATTR_VALUES, "values"},
+ //{SP_ATTR_VALUES, "values"},
{SP_ATTR_KEYTIMES, "keyTimes"},
{SP_ATTR_KEYSPLINES, "keySplines"},
{SP_ATTR_FROM, "from"},
{SP_ATTR_ADDITIVE, "additive"},
{SP_ATTR_ACCUMULATE, "accumulate"},
+ /* SVGFonts */
+ /*<font>*/
+ {SP_ATTR_HORIZ_ORIGIN_X, "horiz-origin-x"},
+ {SP_ATTR_HORIZ_ORIGIN_Y, "horiz-origin-y"},
+ {SP_ATTR_HORIZ_ADV_X, "horiz-adv-x"},
+ {SP_ATTR_VERT_ORIGIN_X, "vert-origin-x"},
+ {SP_ATTR_VERT_ORIGIN_Y, "vert-origin-y"},
+ {SP_ATTR_VERT_ADV_Y, "vert-adv-y"},
+
+ /*<glyph>*/
+ {SP_ATTR_UNICODE, "unicode"},
+ {SP_ATTR_GLYPH_NAME, "glyph-name"},
+ //{SP_ATTR_ORIENTATION, "orientation"},
+ {SP_ATTR_ARABIC_FORM, "arabic-form"},
+ {SP_ATTR_LANG, "lang"},
+
+ /*<hkern> and <vkern>*/
+ {SP_ATTR_U1, "u1"},
+ {SP_ATTR_G1, "g1"},
+ {SP_ATTR_U2, "u2"},
+ {SP_ATTR_G2, "g2"},
+ {SP_ATTR_K, "k"},
+
+ /*<font-face>*/
+ //{SP_ATTR_FONT_FAMILY, "font-family"}, these are already set for CSS2 (SP_PROP_FONT_FAMILY, SP_PROP_FONT_STYLE, SP_PROP_FONT_VARIANT etc...)
+ //{SP_ATTR_FONT_STYLE, "font-style"},
+ //{SP_ATTR_FONT_VARIANT, "font-variant"},
+ //{SP_ATTR_FONT_WEIGHT, "font-weight"},
+ //{SP_ATTR_FONT_STRETCH, "font-stretch"},
+ //{SP_ATTR_FONT_SIZE, "font-size"},
+ {SP_ATTR_UNICODE_RANGE, "unicode-range"},
+ {SP_ATTR_UNITS_PER_EM, "units-per-em"},
+ {SP_ATTR_PANOSE_1, "panose-1"},
+ {SP_ATTR_STEMV, "stemv"},
+ {SP_ATTR_STEMH, "stemh"},
+ //{SP_ATTR_SLOPE, "slope"},
+ {SP_ATTR_CAP_HEIGHT, "cap-height"},
+ {SP_ATTR_X_HEIGHT, "x-height"},
+ {SP_ATTR_ACCENT_HEIGHT, "accent-height"},
+ {SP_ATTR_ASCENT, "ascent"},
+ {SP_ATTR_DESCENT, "descent"},
+ {SP_ATTR_WIDTHS, "widths"},
+ {SP_ATTR_BBOX, "bbox"},
+ {SP_ATTR_IDEOGRAPHIC, "ideographic"},
+ {SP_ATTR_ALPHABETIC, "alphabetic"},
+ {SP_ATTR_MATHEMATICAL, "mathematical"},
+ {SP_ATTR_HANGING, "hanging"},
+ {SP_ATTR_V_IDEOGRAPHIC, "v-ideographic"},
+ {SP_ATTR_V_ALPHABETIC, "v-alphabetic"},
+ {SP_ATTR_V_MATHEMATICAL, "v-mathematical"},
+ {SP_ATTR_V_HANGING, "v-hanging"},
+ {SP_ATTR_UNDERLINE_POSITION, "underline-position"},
+ {SP_ATTR_UNDERLINE_THICKNESS, "underline-thickness"},
+ {SP_ATTR_STRIKETHROUGH_POSITION, "strikethrough-position"},
+ {SP_ATTR_STRIKETHROUGH_THICKNESS, "strikethrough-thickness"},
+ {SP_ATTR_OVERLINE_POSITION, "overline-position"},
+ {SP_ATTR_OVERLINE_THICKNESS, "overline-thickness"},
+
/* XML */
{SP_ATTR_XML_SPACE, "xml:space"},
{SP_ATTR_LAYOUT_OPTIONS,"inkscape:layoutOptions"},
/* CSS2 */
+ {SP_PROP_INKSCAPE_FONT_SPEC, "-inkscape-font-specification"},
/* Font */
{SP_PROP_FONT, "font"},
{SP_PROP_FONT_FAMILY, "font-family"},
{SP_PROP_SYSTEM_LANGUAGE, "systemLanguage"},
{SP_PROP_REQUIRED_FEATURES, "requiredFeatures"},
{SP_PROP_REQUIRED_EXTENSIONS, "requiredExtensions"},
+ /* LivePathEffect */
+ {SP_PROP_PATH_EFFECT, "effect"},
};
#define n_attrs (sizeof(props) / sizeof(props[0]))
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :