dojox.gfx.TextPath._setTextPath
dojo.require("dojox.gfx.svg");
defined in dojox/gfx/svg.js
Usage
function () (view source)
if(typeof this.shape.path != "string"){ return; } var r = this.rawNode; if(!r.firstChild){ var tp = document.createElementNS(dojox.gfx.svg.xmlns.svg, "textPath"), tx = document.createTextNode(""); tp.appendChild(tx); r.appendChild(tp); } var ref = r.firstChild.getAttributeNS(dojox.gfx.svg.xmlns.xlink, "href"), path = ref && dojox.gfx.svg.getRef(ref); if(!path){ var surface = this._getParentSurface(); if(surface){ var defs = surface.defNode; path = document.createElementNS(dojox.gfx.svg.xmlns.svg, "path"); var id = dojox.gfx._base._getUniqueId(); path.setAttribute("id", id); defs.appendChild(path); r.firstChild.setAttributeNS(dojox.gfx.svg.xmlns.xlink, "href", "#" + id); } } if(path){ path.setAttribute("d", this.shape.path); }