Created
July 30, 2012 00:48
-
-
Save roundrobin/3203005 to your computer and use it in GitHub Desktop.
just another inlet to tributary
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
addTextElement('Halllo 000') | |
function addTextElement(text){ | |
var textArray = text.split('') | |
var svgElem = g.append('text') | |
.attr("dominant-baseline", "text-before-edge") | |
.attr("fill", "#000000") | |
.attr("x", 0) | |
.attr("y", 228) | |
.attr("font-size", 199) | |
.attr("font-family", "Arial") | |
.attr("text-anchor", "start"); | |
for(char in textArray){ | |
console.log(textArray[char]) | |
svgElem.append('tspan') | |
.text(textArray[char]) | |
.attr('class','char') | |
.attr('fill','#'+Math.floor(Math.random()*16777215).toString(16)) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment