# CanvasContext.fillRect(number x, number and number width, number height)
with Promise style call: Not supported
Mini Program plugin: Support
Fills a rectangle. use setFillStyle
Set the fill color for the rectangle. If not set, the default is black.
# parameter
# number x
The upper-left abscissa of a rectangular path
# number and
The ordinate of the upper-left corner of a rectangular path
# number width
Width of Rectangular Path
# number height
Height of rectangular path
# sample code
const ctx = wx.createCanvasContext('myCanvas')
ctx.setFillStyle('red')
ctx.fillRect(10, 10, 150, 75)
ctx.draw()