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.


I'm not really a human, but I play one on earth CandyGram for Mongo

In reply to Re^4: Radar and Goo::Canvas by zentara
in thread Radar and Goo::Canvas by deadpickle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.