Is there a way to set a color in goo::canvas that will be invisible? There are 2 different things you are talking about. An item (like a rectangle) will be transparent if you don't fill it with a color. But for an image, the transparency is set in the image. Look at the demo, and the torroid..... the edges and center are transparent because the torroid.png was created with black as transparent. So.... you will need to figure out what is the color of the background of the doppler overlay, and make it transparent. I don't know offhand if the Gtk2 will change transparency of an image (it probably does but the docs don't make it obvious) , or you can use ImageMagick, GD, or Imager to set the transparent color. You might want to ask this on the Perl/Gtk2 maillist. The Gtk2::Image can be loaded with a mask, but I don't have an example. The odds are you will either be setting white or black to be transparent, and I would guess the doppler image would already be setup for transparency. Have you tried to overlay the doppler image onto the geotiff yet? It may just work right out of the box. If you google for "gtk2 image transparent mask" you will find some php code you can adapt to Perl, that shows how to load an image with a transparency mask.
|