[racket] Transparent area's

From: Christophe Vandenberghe (chvndb at gmail.com)
Date: Mon Oct 25 10:41:32 EDT 2010

Even with a transparent canvas the problem persists. A transparent canvas just adds the background color of it's parent to a bitmap you add. So If you were to put a background image in the canvas that would be fine, but as soon as you want to add another image to it with transparency, the canvas adds the color of the parent background to the transparent pixels. So Again you get the grey box effect. But even then it is not what I wish to do as you cannot add buttons and such to a canvas. I'll just avoid transparent images for the time being. Looking forward for ht enew toolkit.

Thanks for the reply.



-----Original Message-----
From: Matthew Flatt [mailto:mflatt at cs.utah.edu] 
Sent: maandag 25 oktober 2010 15:17
To: Noel Welsh
Cc: Christophe Vandenberghe; users at racket-lang.org
Subject: Re: [racket] Transparent area's

Both in the old and new toolboxes, you can make a transparent canvas
using the 'transparent style when you create the `canvas%' object.

If I understand the issue, though, putting a `button%' instance on top
of a `canvas%' doesn't really work in either toolbox. Also, neither
toolbox currently lets you paint the background of a panel (which can
contain buttons and other controls). I think that panel drawing could
be made configurable in the new toolbox --- after everything else is in

At Mon, 25 Oct 2010 14:10:13 +0100, Noel Welsh wrote:
> I'm guessing this is a limitation of the current windowing toolkit.
> There is a new toolkit under development here:
> http://github.com/mflatt/gr2
> I'm going to look at transparency support in the new toolkit, but it
> will take me a while to find the time.
> HTH,
> N.
> BTW, Racket doesn't use CamelCase. The dash is the conventional
> separator within an identifier. like-this not LikeThis
> On Thu, Oct 21, 2010 at 10:28 AM, Christophe Vandenberghe
> <chvndb at gmail.com> wrote:
> > Hi,
> >
> > Yeah, if you want to draw some text that's fine. But even if you want to
> > import an image that has a transparent background onto a drawing canvas, it
> > does not support the transparency. It adds a background color. So that
> > doesn't work either.
> ...
> _________________________________________________
>   For list-related administrative tasks:
>   http://lists.racket-lang.org/listinfo/users

Posted on the users mailing list.