So, I was making a script to draw a rounded rectangle, but when you put Hight and width to 0 and smoothness to 30 it shows a circle insead.
Here the code:
//% block="draw rounded rectangle at $img|x: $x|y: $y|width: $width|height: $height|smoothness: $smooth| color: $c"
//% c.shadow="colorindexpicker"
//% inlineInputMode=inline
//% subcategory="Image"
//% img.defl=picture
//% img.shadow=variables_get
export function RoundedRectangle(img: Image, x: number, y: number, width: number, height: number, smooth: number, c: number) {
for (let index = 0; index <= 360; index++) {
img.fillRect(x + Math.sin(index) * smooth, y + Math.cos(index) * smooth, width, height, c)
}
img.fillRect(x, y, width, height, c)
}