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 );
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.
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.
Still a problem in 1.12.14.
-- 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.