Bug 91835

Summary: transparent images in cairo_win32_printing_surface_t have a black background
Product: cairo Reporter: rodrigo <rodrigorivascosta>
Component: win32 backendAssignee: cairo-bugs mailing list <cairo-bugs>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Initializes cairo_win32_printing_surface_t::content

Description rodrigo 2015-09-01 10:39:17 UTC
Created attachment 118030 [details]
Initializes cairo_win32_printing_surface_t::content

When drawing an image with an alpha channel into a cairo_win32_printing_surface_t, it results in a black background.

cairo version: 1.14.2

It looks like field `cairo_win32_printing_surface_t::content` is used to control the transparency, but that field is never initialized.

Maybe this field is not even necessary, because you can use `win32.base.content`, but it is modified in `_cairo_win32_printing_surface_paint_recording_pattern()` so I'm not so sure.

Anyway, initializing it in `cairo_win32_printing_surface_create()` solves the issue (`win32.base.content` is initialized in `_cairo_surface_init`).
Comment 1 Adrian Johnson 2015-09-30 12:18:08 UTC
Looks good to me. What is the full name you want me to include in the commit author?

(It is easier if you do a git commit / git format-patch so I don't have to manually add the commit metadata)
Comment 2 rodrigo 2015-09-30 14:16:26 UTC
My full name is "Rodrigo Rivas Costa", that will be nice.

I'll do as you say in future patches, this one just looked too small to care.

Thanks!
Comment 3 Adrian Johnson 2015-09-30 14:25:41 UTC
Pushed

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.