🧑🎨 Draws a square or a rounded square.
Also accepts 7 parameters to specify a corner radius for each corner, in the order: top-left, top-right, bottom-right, bottom-left.
x-coordinate
y-coordinate
size of the sides of the square
Optional
radius for all corners
await Canvas(200);background(0.8);square(-70, -70, 40);square(-20, -20, 40, 10);square(30, 30, 40, 20, 4, 0, 8); Copy
await Canvas(200);background(0.8);square(-70, -70, 40);square(-20, -20, 40, 10);square(30, 30, 40, 20, 4, 0, 8);
🧑🎨 Draws a square or a rounded square.
Also accepts 7 parameters to specify a corner radius for each corner, in the order: top-left, top-right, bottom-right, bottom-left.