Created
June 16, 2020 05:35
-
-
Save treeform/260e4c5318353937e40c897e706c56b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fidget, flippy, chroma | |
| var f = newImage(400, 400, 4) | |
| for x in 0 ..< 400: | |
| for y in 0 ..< 400: | |
| f.putRgba(x, y, hsl(x.float/400*360, y.float/400*100, 75).color.rgba) | |
| f.save("data/generated.png") | |
| setTitle("Image viewer") | |
| proc drawMain() = | |
| group "image": | |
| box 0, 0, 400, 400 | |
| image "generated.png" | |
| startFidget(drawMain, w = 400, h = 400) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is how it looks: