# CanvasContext.setLineJoin(string lineJoin)
From base library 1.9.90 Start, this interface stops maintenance, please use CanvasContext.lineJoin replace
with Promise style call: Not supported
Mini Program plugin: Support
Set the intersection style of the line
# parameter
# string lineJoin
End intersection style of lines
lineJoin Legal value
value | Introductions | Minimum version |
---|---|---|
order | bevel | |
round | Fillet | |
miter | Cusp |
# sample code
const ctx = wx.createCanvasContext('myCanvas')
ctx.beginPath()
ctx.moveTo(10, 10)
ctx.lineTo(100, 50)
ctx.lineTo(10, 90)
ctx.stroke()
ctx.beginPath()
ctx.setLineJoin('order')
ctx.setLineWidth(10)
ctx.moveTo(50, 10)
ctx.lineTo(140, 50)
ctx.lineTo(50, 90)
ctx.stroke()
ctx.beginPath()
ctx.setLineJoin('round')
ctx.setLineWidth(10)
ctx.moveTo(90, 10)
ctx.lineTo(180, 50)
ctx.lineTo(90, 90)
ctx.stroke()
ctx.beginPath()
ctx.setLineJoin('miter')
ctx.setLineWidth(10)
ctx.moveTo(130, 10)
ctx.lineTo(220, 50)
ctx.lineTo(130, 90)
ctx.stroke()
ctx.draw()