Salta al contenuto principale

in reply to Sebastian "spaetz" Spaeth

and also, can it get a Gtk.Image somehow? I was able to a) either save it to a file or retrieve an in-memory bitmap which could not be easily squeezed into a Gtk.Image.

Going to check it out.

in reply to Sebastian "spaetz" Spaeth

You can load the bitmap into a Gdk.PixBuf, then you can do whatever.
git.sr.ht/~fabrixxm/zint-vapi/…

I wanted to have the bitmap field as uint8[], mostly because looks vala-y and because it's what is in Gdk.PixBuf.from_data()'s signature).
I found that it needs a length to works with Gdk.PixBuf.from_data(), so I added the get_bitmap() method to set the length.. It works but I don't know if it's the correct solution... there so much things I'm not sure about and docs are useful only up to a point...

(as a side node, the zint.h header I have on disk has a bitmap_byte_length field which would be so good to use as length value for bitmap (setting it directly in field's annotation in vapi) but looks like is not used and docs doesn't mention it.....)

Unknown parent

Fabio
Oh for Vala's sake! I spent a day on this (vala is not a language I really know) and now there are already at least two vapi files ready 😃

Questo sito utilizza cookie per riconosce gli utenti loggati e quelli che tornano a visitare. Proseguendo la navigazione su questo sito, accetti l'utilizzo di questi cookie.