Bug 91835 - transparent images in cairo_win32_printing_surface_t have a black background
Summary: transparent images in cairo_win32_printing_surface_t have a black background
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: win32 backend (show other bugs)
Version: unspecified
Hardware: Other Windows (All)
: medium normal
Assignee: cairo-bugs mailing list
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-01 10:39 UTC by rodrigo
Modified: 2015-09-30 14:25 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Initializes cairo_win32_printing_surface_t::content (508 bytes, text/plain)
2015-09-01 10:39 UTC, rodrigo
Details

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.