in reply to Perl/Tk problems with PNG transparence
#!/usr/bin/perl use warnings; use strict; use Tk::Zinc; my $width = 100; my $height = 100; my $mw = MainWindow->new(-background => 'cyan'); $mw->geometry($width.'x'.$height.'+300+300'); $mw->overrideredirect(1); my $zinc = $mw->Zinc(-width => $width, -height => $height, -reshape => 1, #clips zinc -fullreshape => 1, #clips $mw and xterm -backcolor => 'cyan', )->pack; #make a flower my $petal = $zinc->add('curve',1,[[$width/2,$height], [0,0, 'c'], [$width,0, 'c'], [$width/2,$height]], -tags => ['bezier1'], -filled => 1, -fillcolor => 'cyan', -closed => 1, -linewidth => 0, -priority => 1, -visible => 0, ); # using the triangulaire curve to reshape both TkZinc and Mainwindow w +idgets $zinc->itemconfigure(1, -clip => $petal); my $petal1 = $zinc->add('curve',1,[[$width/2,$height], [-2*$width,-100 +, 'c'], [3*$width,-100, 'c'], [$width/2,$hei +ght]], -tags => ['bezier1'], -filled => 1, -fillcolor => 'cyan', -closed => 1, -linewidth => 0, -priority => 1, -visible => 1, ); &Tk::MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl/Tk problems with PNG transparence
by wmfs (Acolyte) on Jul 30, 2014 at 15:36 UTC | |
by dasgar (Priest) on Jul 30, 2014 at 16:32 UTC | |
by zentara (Cardinal) on Jul 30, 2014 at 16:42 UTC |