CanvasContext.strokeRect
Draw a none-filled rect.
Parameters
It is Object type.
Property | Type | Description |
x | Number | The x coordinate of left-upper corner of rect. |
y | Number | The y coordinate of left-upper corner of rect. |
width | Number | The width of rect. |
height | Number | The height of rect. |
Sample Code
copy
//.js
const ctx = my.createCanvasContext('awesomeCanvas')
ctx.setStrokeStyle('blue')
ctx.strokeRect(20, 20, 250, 80)
ctx.draw()