Ah, if you're preprocessing, that should make your life easier. Here's a little code I whipped up using Graphics2D (using J2SE). I don't like that the output includes extra interior segments, but when it's filled, it looks pretty good.
import java.awt.BasicStroke;
import java.awt.Shape;
import java.awt.geom.Path2D;
import java.awt.geom.PathIterator;
public class StrokePath
{
public static void main(String[] args)
{
BasicStroke bs = new BasicStroke(6.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL);
Path2D p = new Path2D.Float();
p.moveTo(50.0, 50.0);
p.lineTo(65.0, 100.0);
p.lineTo(70.0, 60.0);
p.lineTo(120.0, 65.0);
p.lineTo(40.0, 200.0);
Shape s = bs.createStrokedShape(p);
PathIterator pi = s.getPathIterator(null);
while (!pi.isDone())
{
pi.next();
double[] coords = new double[6];
int type = pi.currentSegment(coords);
switch (type)
{
case PathIterator.SEG_LINETO:
System.out.println(String.format("SEG_LINETO %f,%f", coords[0], coords[1]));
break;
case PathIterator.SEG_CLOSE:
System.out.println("SEG_CLOSE");
break;
case PathIterator.SEG_MOVETO:
System.out.println(String.format("SEG_MOVETO %f,%f", coords[0], coords[1]));
break;
default:
System.out.println("*** More complicated than LINETO... Maybe should use FlatteningPathIterator? ***");
break;
}
}
}
}
Here are my results after rendering these coordinates:

