Bug 59817

Summary: Cairo 1.12 cannot print alpha lines in Windows
Product: cairo Reporter: Michael Cronenworth <mike>
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.12.14   
Hardware: Other   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 68382    

Description Michael Cronenworth 2013-01-24 19:44:07 UTC
Cairo 1.10 prints lines with alpha just fine. Switching to a Cairo 1.12.10 DLL, all my alpha lines turned opaque and print solid black.

When printing with 1.12.10 in Linux, my lines are still printing with alpha set correctly.

Example code:

    cairo_save( cr );
    cairo_set_source_rgba( cr, 0.0, 0.0, 0.0, 0.25 );
    cairo_set_line_width( cr, 8.0 );
    cairo_move_to( cr, cwidth / 2 - ( 100 - x ), ( y ) / 2 );
    cairo_line_to( cr, ( cwidth / 2 - ( 100 - x ) ) + length, y / 2 );
    cairo_stroke( cr );
    cairo_restore( cr );
Comment 1 is 2013-01-25 19:28:47 UTC
This happens on win32 printing surface. Semi-transparent objects are blended with black instead of white background. I guess, it happens because a blank win32 printing surface is supposed to be black. The workaround is filling the entire printable range with white color prior to doing any other drawing operations.
Comment 2 Michael Cronenworth 2013-01-25 19:48:49 UTC
OK, I see that when I put white under it. I get my alpha-blended line. I still consider it a bug. The default on Linux is still white and the default on Windows up until Cairo 1.10 was white. It should still be white, IMHO.
Comment 3 Michael Cronenworth 2013-03-06 17:38:35 UTC
Still a problem in 1.12.14.
Comment 4 GitLab Migration User 2018-08-25 13:44:41 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/174.

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.