miterLimit : Maximum length of line join on a Canvas
Change the miterLimit value by dragging the slider for value less than 3 , the join type will be bevel.
var my_canvas=$('#my_canvas').get(0) var gctx = my_canvas.getContext("2d"); gctx.beginPath() gctx.moveTo(100,280); gctx.lineJoin = 'miter'; gctx.miterLimit=4; gctx.lineTo(180,80); gctx.lineTo(260,280); gctx.strokeStyle= '#008cf5'; gctx.lineWidth =50; gctx.stroke();
This article is written by plus2net.com team.
|