Howto:Extend the Canvas SVG module: Difference between revisions

Jump to navigation Jump to search
Line 128: Line 128:
</syntaxhighlight>
</syntaxhighlight>


Once we do have a valid filename/URL, we can simply call the setFile() method:
Once we do have a valid filename/URL, we can simply set the filename property of the new Canvas.Image child. Once again, it makes sense to look at other elements, e.g. Canvas.Text, and its way to set the value of a node:
 
pushElement('text', id);
stack[-1].set("text", tspan.text);

Navigation menu