I am using Cairo for the redistributable WebKit build on Windows. There are a few cases where I need to access the resulting 32-bit ARGB format images produced with Cairo via an HBITMAP window handle. Unfortunately, none of the existing API calls are ideal: 1. cairo_win32_surface_create(HDC dc) only returns 24-bit bitmaps. 2. cairo_win32_surface_create_with_dib () does what I want, but does not provide access to the internal HBITMAP object. 3. cairo_image_surface_create_for_data is almost exactly what I need, except there is no way to tag it internally so that drawing functions properly invert the bitmap representation so images are shown right-side-up. Much of the functionality I would like access to exists in the private (internal) _cairo_win32_surface_create_for_dc function (in cairo-win32-surface.c), but is obviously not accessible to external users. Some of my trouble could be mitigated by adding a new function 'cairo_win32_surface_get_bitmap' (analogous to cairo_win32_surface_get_dc) that simply returned the internal HBITMAP reference in cairo_win32_surface_t.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/309.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.