Add d attribute to textPath element (ACTION-3322)
authorBrian Birtles <birtles@gmail.com>
Fri, 01 Mar 2013 15:41:28 +0900
changeset 446 c1d46d287ee5
parent 445 506ca7dd8e80
child 448 ade0da5d3552
Add d attribute to textPath element (ACTION-3322)
master/changes.html
master/definitions.xml
master/text.html
--- a/master/changes.html	Fri Mar 01 14:52:23 2013 +0900
+++ b/master/changes.html	Fri Mar 01 15:41:28 2013 +0900
@@ -106,6 +106,8 @@
   <li>Added <a>'white-space'</a> property and deprecated <a>'xml:space'</a> attribute.</li>
 
   <li>Removed the <span class='property'>'kerning'</span> property.</li>
+
+  <li>Added <a>'textPath/d'</a> attribute to <a>'textPath'</a>.</li>
 </ul>
 
 <h3 id="painting">Painting chapter</h3>
--- a/master/definitions.xml	Fri Mar 01 14:52:23 2013 +0900
+++ b/master/definitions.xml	Fri Mar 01 15:41:28 2013 +0900
@@ -694,6 +694,7 @@
       attributecategories='aria, conditional processing, core, graphical event, presentation, style, xlink'
       attributes='lengthAdjust, textLength'
       interfaces='SVGTextPathElement'>
+    <attribute name='d' href='text.html#TextPathElementDAttribute' animatable='yes'/>
     <attribute name='xlink:href' href='text.html#TextPathElementHrefAttribute' animatable='yes'/>
     <attribute name='startOffset' href='text.html#TextPathElementStartOffsetAttribute' animatable='yes'/>
     <attribute name='method' href='text.html#TextPathElementMethodAttribute' animatable='yes'/>
--- a/master/text.html	Fri Mar 01 14:52:23 2013 +0900
+++ b/master/text.html	Fri Mar 01 15:41:28 2013 +0900
@@ -3621,11 +3621,12 @@
 <edit:with element='textPath'>
 
 <p>In addition to text drawn in a straight line, SVG also includes the ability
-to place text along the shape of a <a>'path'</a> element. To specify that a
-block of text is to be rendered along the shape of a <a>'path'</a>, include
-the given text within a <a>'textPath'</a> element which includes an
-<a>'xlink:href'</a> attribute with an <a>IRI reference</a>
-to a <a>'path'</a> element.</p>
+to place text along the shape of a <a>'path'</a> element.
+To specify that a block of text is to be rendered along the shape of
+a <a>'path'</a>, include the given text within a <a>'textPath'</a> element which
+includes an <a>'xlink:href'</a> attribute with an <a>IRI reference</a> to
+a <a>'path'</a> element, or a <a>'d'</a> attribute that specifies the path data
+directly.</p>
 
 <h3 id="TextPathElement">The <span class="element-name">'textPath'</span> element</h3>
 
@@ -3659,7 +3660,7 @@
         class="adef">startOffset</span> = "<span
         class="attr-value"><a
         href="types.html#DataTypeLength">&lt;length&gt;</a></span>"</dt>
-        <dd>An offset from the start of the <a>'path'</a> for the initial
+        <dd>An offset from the start of the path for the initial
         current text position, calculated using the user agent's <a
         href="paths.html#DistanceAlongAPath">distance along the
         path</a> algorithm.<br />
@@ -3671,9 +3672,9 @@
          If a percentage is given, then the <a>'startOffset'</a> represents a
         percentage distance along the entire path. Thus, <span
         class="attr-value">startOffset="0%"</span> indicates the
-        start point of the <a>'path'</a> and <span
+        start point of the path and <span
         class="attr-value">startOffset="100%"</span> indicates the
-        end point of the <a>'path'</a>.<br />
+        end point of the path.<br />
         <br />
          If the attribute is not specified, the effect is as if a
         value of "0" were specified.<br />
@@ -3729,6 +3730,30 @@
          <span class="anim-target"><a
         href="animate.html#Animatable">Animatable</a>:
         yes.</span></dd>
+        <dt id="TextPathElementDAttribute"><span
+        class="adef">d</span> =
+        "<a href="paths.html#PathData"><em>path data</em></a>"</dt>
+        <dd>The definition of the path onto which the glyphs will be rendered.
+        The handling of erroneous path data follows the behavior specified in
+        the <a href="implnote.html#PathElementImplementationNotes"><span
+        class="element-name">'path'</span> element implementation
+        notes</a>.<br/>
+        If both the <a>'d'</a> attribute and <a>'xlink:href'</a>
+        attributes are specified, it is as if the <a>'xlink:href'</a> attribute
+        were not specified for the purposes of rendering.
+        In the <a>SVGTextPathElement</a> interface both values will still be
+        reflected.
+        Furthermore, if a value for <a>'xlink:href'</a> is specified in markup
+        and path data is subsequently specified via the
+        <a>SVGAnimatedPathData::pathSegList</a> member of the
+        <a>SVGTextPathElement</a>, then this is equivalent to specifying the
+        <a>'d'</a> attribute&#x2014;the <a>'xlink:href'</a> will be disregarded
+        for rendering and the path specified in the
+        <a>SVGAnimatedPathData::pathSegList</a> will be used instead.
+        <br/>
+        <span class="anim-target"><a
+        href="animate.html#Animatable">Animatable</a>:
+        yes.</span></dd>
         <dt><a id="TextPathElementHrefAttribute"></a> <span
         class="adef">xlink:href</span> = "<span
         class="attr-value"><a
@@ -5329,7 +5354,8 @@
   readonly attribute <a class="idlinterface" href="types.html#InterfaceSVGAnimatedEnumeration">SVGAnimatedEnumeration</a> <a href="text.html#__svg__SVGTextPathElement__spacing">spacing</a>;
 };
 
-<a>SVGTextPathElement</a> implements <a>SVGURIReference</a>;</pre>
+<a>SVGTextPathElement</a> implements <a>SVGURIReference</a>;
+<a>SVGTextPathElement</a> implements <a>SVGAnimatedPathData</a>;</pre>
 
 <dl class="interface">
 <dt class="constants-header">Constants in group “textPath Method Types”:</dt>