gir.core icon indicating copy to clipboard operation
gir.core copied to clipboard

support cairo_image_surface_create_from_png()

Open medovina opened this issue 8 months ago • 8 comments

The function cairo_image_surface_create_from_png() does not seem to be exposed in Gir.Core:

https://www.cairographics.org/manual/cairo-PNG-Support.html

This is a useful function for loading a PNG image directly into a Cairo image surface, so it would be nice to have it available.

medovina avatar Apr 04 '25 14:04 medovina

As Cairo is implemented manually it should not be to hard to add the API as a static method on the ImageSurface class in the public and internal folders inside Cairo.

Feel free to open a PR for it 👍.

badcel avatar Apr 04 '25 17:04 badcel

As Cairo is implemented manually

Can Gir.Core depend on an external dependency? I have a cairo wrapper that is feature complete, just need to push a stable version to NuGet in case of.

gfoidl avatar Nov 17 '25 20:11 gfoidl

Thanks for your suggestion but I don't want to rely on another nuget.

GirCore is just a wrapper (even for Cairo) having it depend on another wrapper does not make a lot of sense. Additionally it relies on auto generated types for Cairo, too.

badcel avatar Nov 17 '25 22:11 badcel