From e88644b0f3481c78a9563dbf9ee6b76ab6674583 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Tue, 13 Feb 2018 15:48:14 +0100 Subject: Promote the path 'd' attribute to a property per SVG 2. This allows 'd' to be animated via CSS animations. Due to the interactions of 'd' with LPE's, 'd' as a property is converted to 'd' as an attribute in SPPath::update. This changes the XML which causes update() to be called again (and triggers a warning). Fixing this is left to a future patch as is converting the 'd' back to a property on output. --- src/attributes.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/attributes.cpp') diff --git a/src/attributes.cpp b/src/attributes.cpp index 6522563af..7a3916f6d 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -138,7 +138,6 @@ static SPStyleProp const props[] = { {SP_ATTR_X, "x"}, {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"}, @@ -422,6 +421,9 @@ static SPStyleProp const props[] = { /* CSS & SVG Properites */ + /* SVG 2 Attributes promoted to properties */ + {SP_ATTR_D, "d"}, + /* Paint */ {SP_PROP_COLOR, "color"}, {SP_PROP_OPACITY, "opacity"}, @@ -552,6 +554,7 @@ static SPStyleProp const props[] = { /* LivePathEffect */ {SP_PROP_PATH_EFFECT, "effect"}, + }; #define n_attrs (sizeof(props) / sizeof(props[0])) -- cgit v1.2.3