Canvas线条样式

 

canvasContext.setLineWidth

设置线条的宽度

canvasContext.setLineWidth(lineWidth)
canvasContext.lineWidth = lineWidth // 基础库 1.9.90 起支持



canvasContext.setLineCap

设置线条的端点样式。

canvasContext.setLineCap(lineCap)

canvasContext.lineCap = lineCap   //1.9.90起支持

canvasContext.setLineJoin

设置线条的交点样式。

canvasContext.setLineJoin(lineJoin)

canvasContext.lineJoin = lineJoin

canvasContext.setLineDash

 设置线条的宽度。a

 

canvasContext.setMiterLimit

 设置最大斜接长度,斜接长度指的是在两条线交汇处内角和外角之间的距离。 当 setLineJoin() 为 miter 时才有效。超过最大倾斜长度的,连接处将以 lineJoin 为 bevel 来显示

 

 

 















posted @ 2018-06-08 14:58  离清欢  阅读(416)  评论(0)    收藏  举报