pixie/examples/rounded_rectangle.nim
2021-02-18 16:33:41 -06:00

14 lines
255 B
Nim

import pixie
let image = newImage(200, 200)
image.fill(rgba(255, 255, 255, 255))
let
pos = vec2(50, 50)
wh = vec2(100, 100)
r = 25.0
image.drawRoundedRect(rect(pos, wh), r, rgba(0, 255, 0, 255))
image.writeFile("examples/rounded_rectangle.png")