title: How to get the outline of a stroke?
body: <p>I want to convert a stroked path to a filled object. (Programmatically, in JavaScript.)</p>
  
  <p>The line is just a simple curved line, a sequence of coordinates. I can render this line as a path, and give it a stroke of a certain thickness... but I'm trying to get a filled shape rather than a stroked line, so that I can do further modifications on it, such as warping it, so the resulting 'stroke' might vary in thickness or have custom bits cut out of it (neither of these things are possible with a real SVG stroke, as far as I can tell).</p>
  
  <p>So I'm trying to manually 'thicken' a line into a solid shape. I can't find any function that does this – I've looked through the docs of <a href="http://d3js.org/" rel="noreferrer">D3.js</a> and <a href="http://raphaeljs.com/" rel="noreferrer">Raphaël</a>, but no luck. Does anyone know of a library/function that would do this?</p>
  
  <p>Or, even better: if someone could explain to me the geometry theory about how I would do this task manually, by taking the list of line coordinates I have and working out a new path that effectively 'strokes' it, that would be amazing. To put it another way, what does the <em>browser</em> do when you tell it to stroke a path – how does it work out what shape the stroke should be?</p>