Hey there kojix2,
I just tested the --pre variant of libui and your example at:
https://raw.githubusercontent.com/kojix2/LibUI/refs/heads/main/examples/area_draw_image.rb
works fine, drawing striped rainbow-like patterns.
I understand, I think, the code in that sample_rgba() provides the R, G, B colours
and:
LibUI.image_append(image, pixels, width, height, width * 4)
will do the actual drawing.
My question here is: is it possible to paint a regular image that way as well, perhaps
via some conversion? For instance, I use https://github.com/hzeller/timg to show
images on the terminal (KDE konsole). If the new functionality in ruby-LibUI allows
for images to be drawn, if the RGB values are known at each individual point,
perhaps we can already draw existing images, even if only simple images. That may
also help having more UI elements that could be put into a libui application.
Hey there kojix2,
I just tested the --pre variant of libui and your example at:
https://raw.githubusercontent.com/kojix2/LibUI/refs/heads/main/examples/area_draw_image.rb
works fine, drawing striped rainbow-like patterns.
I understand, I think, the code in that sample_rgba() provides the R, G, B colours
and:
will do the actual drawing.
My question here is: is it possible to paint a regular image that way as well, perhaps
via some conversion? For instance, I use https://github.com/hzeller/timg to show
images on the terminal (KDE konsole). If the new functionality in ruby-LibUI allows
for images to be drawn, if the RGB values are known at each individual point,
perhaps we can already draw existing images, even if only simple images. That may
also help having more UI elements that could be put into a libui application.