pixie/examples/square.nim
2021-02-19 12:06:16 -06:00

13 lines
223 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)
image.fillRect(rect(pos, wh), rgba(255, 0, 0, 255))
image.writeFile("examples/square.png")