Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat Apple API Drawing SetStrokeStyle (Set Line Style)


May 19, 2021 WeChat Mini Program Development Document


Table of contents


WeChat Apple API Drawing SetStrokeStyle (Set Line Style) Drawing interfaces and methods


canvasContext.setStrokeStyle


Defined

Set the border color.

Tip : If fillStyle the default color is black

Parameters

Parameters Type Defined
color Color Gradient Object Fill color

Example

const ctx = wx.createCanvasContext('myCanvas')
ctx.setStrokeStyle('red')
ctx.strokeRect(10, 10, 150, 75)
ctx.draw()

WeChat Apple API Drawing SetStrokeStyle (Set Line Style)

WeChat Apple API Drawing SetStrokeStyle (Set Line Style) Drawing interfaces and methods