Hi all,
I'm currently adding a splashscreen to my application.
I'm using Tk::Splashscreen for that (but it is possible to switch)
I've created a nice png with some transparency and blurring on the sides, to create a nice effect.
The problem is this:
I expected to see my desktop background through the transparent parts of my image, but instead, I see the background of the canvas that I put the image on.
This is my code:
my $splash = $mw->Splashscreen(-milliseconds => 3000);
my $canvas = $splash->Canvas(-width => 420,
-height => 300)->pack;
$canvas->createImage(0, 0,
-anchor => 'nw',
-image => $mw->Photo(-file => 'gfx/splash.png'));
$mw->withdraw;
$splash->Splash();
I've also tried to put the image on a label instead of on a canvas:
$splash->Label(-image => $mw->Photo(-file => 'gfx/splash.png'));
But the result is the same.
I've read in Perl-Tk's docs, and I've seen here and there that backgrounds can be set to be transparent by setting the -background to undef. But that doesn't seem to help me too.
Do any of you monks have any idea of how I can make the background of my image-container transparent too? So that I see whatever is behind the splashscreen through the transparent parts of my image?
Thanks!
ldx
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.