Created
February 23, 2009 14:00
-
-
Save magmoro/68956 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SVG={ | |
ns: 'http://www.w3.org/2000/svg' | |
} | |
var svg = document.createElementNS(SVG.ns, 'svg').inject(document.body); | |
svg.setAttribute('width',100); | |
svg.setAttribute('height',100); | |
svg.setStyles({ | |
position: 'absolute', | |
left:10, | |
top:10 | |
}); | |
var text=document.createElementNS(SVG.ns, 'text'); | |
text.setAttribute('font-size',20); | |
text.setAttribute('font-family','Arial'); | |
text.style.position='absolute'; | |
text.setAttribute('x',10); | |
text.setAttribute('y',20); | |
text.setAttribute('transform', "rotate(90) translate(0 -40)"); | |
//text.setAttribute('transform', "translate(30 0)"); | |
var textNode=svg.ownerDocument.createTextNode('MooTools'); | |
text.appendChild(textNode); | |
svg.appendChild(text); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment