Bug 18962

Summary: Request Additional Win32 Image Surface Format Support
Product: cairo Reporter: Brent Fulgham <bfulgham>
Component: win32 backendAssignee: cairo-bugs mailing list <cairo-bugs>
Status: RESOLVED MOVED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.8.4   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Brent Fulgham 2008-12-08 15:29:18 UTC
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.
Comment 1 GitLab Migration User 2018-08-25 14:00:13 UTC
-- 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.