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
/** | |
* @author Jan Marsch (@kekscom) | |
* @example see http://jsfiddle.net/osmbuildings/2e5KX/5/ | |
* @example thickLineToPolygon([{x:50,y:155}, {x:75,y:150}, {x:100,y:100}, {x:50,y:100}], 20) | |
* @param polyline {array} a list of point objects in format {x:75,y:150} | |
* @param thickness {int} line thickness | |
*/ | |
var thickLineToPolygon = (function () { | |
function getOffsets(a, b, thickness) { |