From:  T Rowley <tor@acm.org>
Date:  24 Nov 2005 02:45:36 Hong Kong Time
Newsgroup:  news.mozilla.org/netscape.public.mozilla.layout
Subject:  

Re: Background color for SVG

NNTP-Posting-Host:  pixpat.austin.ibm.com

On 11/23/05 3:26 AM, Peter Weilbacher wrote:
> The part that I didn't describe above and that you are not aware of was
> that we cannot draw transparent pixels on OS/2 (the graphics routines
> don't know an alpha channel). We can only compute the appearance of
> transparency and so simulate the correct appearance.
> Under these circumstances, cairo doesn't draw anything for the empty
> areas. But when blitting to screen the transparent areas are filled with
> whatever was there before (random parts of previous SVG content in most
> cases). As cairo has no knowledge about the background color it cannot
> draw these pixels correctly. Hence my original question about the
> background color behind the SVG and how I could access it from
> nsSVGCairoCanvas.

It sounds like your cairo backend might be correctly implemented, but as 
it isn't in CVS I can't check.  Cairo has fallbacks that allow it to be 
implemented on platforms that have no native support for an alpha 
channel.  If a backend doesn't support native compositing, the fallback 
calls _cairo_os2_surface_acquire_dest_image to obtain the current 
surface contents, does the composite internally, and then 
_cairo_os2_surface_release_dest_image to render the result.  This is 
similar to the method nsImageOS2.cpp uses to draw RGBA images.

-tor