Here are some graphics basics. More words needed.
First, initialize the framebuffer. Do it with
An optional zoom amount can be set with
(monolith/gfx-zoom 4) # set to 4x
Set dimensions with
Note that the size cannot exceed
(monolith/gfx-setsize 128 128)
The currently set framebuffer dimensions can be retrieved
(print (monolith/gfx-width)) (print (monolith/gfx-height))
Pixels can be directly written to the buffer with
monolith/set-pixel, it has the arguments, x, y,
then, R, G, B, A for the colors.
The code below sets a red pixel at coordinate (10, 10).
(monolith/gfx-pixel-set 10 10 255 0 0 255)
Write to PNG with