Is there a high level crate that creates shapes based on commands, kinda like the processing language? If so can this be displayed through the xorg server or something?
Maybe this would work for you:
You'd need to combine it yourself with some other library that opens a window and provides a canvas.
I'm also interested in something like that.
Did you see Nannou?
That's something I will have a look at.
There is glium_shapes. (but glium is a huge dependency)
It is possible to generate an SVG then render it with servo, but it wouldn't be the simplest solution.
Out of all the libraries you guys have suggested, which one should I use then? I just want to use it to create widgets?
Considering the C dependency, is it really still lighter? I didn't dive into it yet, but I'm interested.
piet quite nice to work with in the past.
Have you used other libraries? Does
piet draw shapes you define (for example you define where the square should be drawn)?
From there you can call methods like
RenderContext::fill() with that particular shape and a fill style (solid colour, gradient, etc.). Once you've finished painting a frame you'll call
finish() to do any finalizing before the image is drawn to the screen.
I've also used the HTML5Canvas directly by compiling my code to WebAssembly, loading it into the browser, then calling various methods on the
CanvasRenderingContext2d. It works pretty well, and by running in a browser you don't need to mess around with WinForms/GTK/Qt/whatever.
Ah I see, thanks mate
sdl2 is dynamically linked, so yes, if you already have sdl installed. glium adds about a hundred dependencies that are very long to build.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.