[plt-scheme] Loading transparent png

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Jun 9 16:49:46 EDT 2006

You have to pass `(send cross-bitmap get-loaded-mask)' as the sixth
argument to `draw-bitmap'. It doesn't automatically use an attached
mask (though it should).

Matthew

At Fri, 9 Jun 2006 19:12:48 +0100, "Paulo J. Matos" wrote:
> Hi all,
> 
> I'm loading a transparent PNG to a canvas with:
> (instantiate canvas% ()
>                          (parent hpane-top)
>                          (style '(transparent))
>                          (paint-callback (lambda (canvas dc)
>                                            (send dc draw-bitmap
> cross-bitmap 0 0)))))
> 
> However, the PNG is not showing up as transparent but with a white
> background, or probably it's shown as transparent but canvas is
> 'drawing' a white background which I can't seem to remove.
> 
> What's the best way to do this?
> 
> Thanks,
> 
> -- 
> Paulo Jorge Matos - pocm at sat inesc-id pt
> Web: http://sat.inesc-id.pt/~pocm
> Computer and Software Engineering
> INESC-ID - SAT Group
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.