HTML5 canvas Rectangle Tutorial
To create a rectangle with Konva
, we can instantiate a Konva.Rect()
object.
For a full list of attributes and methods, check out the Konva.Rect documentation.
You can define corner radius for Konva.Rect
. It can be simple number or array of numbers [topLeft, topRight, bottomRight, bottomLeft]
.
- Vanilla
- React
- Vue