Created
July 29, 2012 09:48
-
-
Save roundrobin/3197132 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
var startX = 50 | |
var startY = 200 | |
var curve = 150 | |
var amplitude = -151 | |
var targetX = 449 | |
var targetY = 0 | |
var svg = d3.select('svg') | |
var defs = svg.append('defs') | |
var font_size = 70 | |
var text_string = 'tributary design' | |
var font_face = 'Arial' | |
//______ To adjust change parameters above __________ | |
defs.append('path') | |
.attr('d','M '+startX+' '+startY+' q '+curve+' '+amplitude+' '+targetX+' '+targetY+'') | |
.attr('stroke','blue') | |
.attr('stroke-width',3) | |
.attr('fill','none') | |
.attr('id','bezierCurve') | |
var text = svg.append('text') | |
.attr('font-size',font_size) | |
.attr('font-family',font_face) | |
text.append('textPath') | |
.attr('xlink:href','#bezierCurve') | |
.text(text_string) | |
svg.append('use') | |
.attr('xlink:href','#bezierCurve') | |
.text(text_string) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment