2021-02-18 19:39:11 +00:00
|
|
|
import pixie
|
2020-12-01 17:49:41 +00:00
|
|
|
|
2021-02-18 19:55:26 +00:00
|
|
|
let image = newImage(200, 200)
|
2020-12-04 16:32:03 +00:00
|
|
|
image.fill(rgba(255, 255, 255, 255))
|
2020-12-01 17:49:41 +00:00
|
|
|
|
2021-02-18 19:55:26 +00:00
|
|
|
let
|
|
|
|
pos = vec2(50, 50)
|
|
|
|
wh = vec2(100, 100)
|
2021-01-29 20:17:24 +00:00
|
|
|
|
2021-02-19 18:04:27 +00:00
|
|
|
image.fillRect(rect(pos, wh), rgba(255, 0, 0, 255))
|
2020-12-01 17:49:41 +00:00
|
|
|
|
|
|
|
image.writeFile("examples/square.png")
|