WeChat applet API drawing fillRect (fill rectangle)
fillRect
Definition
Fills a rectangle.
Tip: Use setFillStyle()
to set the fill color of the rectangle. If not set, the default is black.
Parameters
Example
const ctx = wx.createCanvasContext('myCanvas') ctx.setFillStyle('red') ctx.fillRect(10, 10, 150, 75) ctx.draw()