Skip to content

Instantly share code, notes, and snippets.

@roundrobin
Created July 29, 2012 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roundrobin/3197132 to your computer and use it in GitHub Desktop.
Save roundrobin/3197132 to your computer and use it in GitHub Desktop.
just another inlet to tributary
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