On Tuesday, 22 March 2016 at 15:33:04 UTC, Edwin van Leeuwen
wrote:
On Tuesday, 22 March 2016 at 15:19:10 UTC, rikki cattermole
wrote:
Idea 1:
Sigh I do wish the author of gl3n had given permission for
relicense for Phobos. Would do what you want.
Idea 3:
My goal is get windowing/image library into Phobos. Now that
is not a UI toolkit but you can atleast get a window up and
show an image like a graph.
Kinda everything you want.
Any tips on how easy it will be to plot a cairo surface to a
window ?
Very easy.
- wrap a context in a Canvas with the methods for drawing.
- BLIT the cairo surface.
It also works with simple bitmaps, so image proceduraly rendered.
Actually I've started to work on this at the end of 2015.
(https://github.com/BBasile/kheops/blob/master/src/kheops/bitmap.d#L396)
While it was planned to make a native D UI, using it to plot 2D
data would require very few work. There's also a OO wrapper
called cairoD or something like that which is for sure very easy
to use to render bitmap proceduraly.
The positive point with cairo is that it has a "png surfaces" so
images can be saved in a single call (cairo_surface_write_to_png).