#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::JPEG; use Tk::Zinc; my $width = 300; my $height = 150; my $xpos = -10; my $ypos = -10; my $mw = MainWindow->new(-background => 'black', -cursor => "top_left_arrow"); $mw->geometry($width.'x'.$height.$xpos.$ypos); $mw->overrideredirect(1); my ($background,$imageon,$imageoff) = get_chrome(); my $zinc = $mw->Zinc(-width => $width, -height => $height, -reshape => 1, #clips zinc -fullreshape => 1, #clips $mw and xterm -backcolor => 'black', )->pack; my $ufo = $zinc->add('curve',1,[[$width/2,0], [2*$width,0, 'c'], [2*$width,$height, 'c'], [$width/2,$height], [-$width,$height, 'c'], [-$width,0, 'c'], [$width/2,0]], -tags => ['bezier1'], -closed => 1, -visible => 1, -filled => 1, -fillcolor => 'black', -priority => 1, ); my $ufo1 = $zinc->clone($ufo); $zinc->itemconfigure($ufo1, -tile => $background, -linecolor => 'black', -linewidth => 3, -priority => 2, ); my $bgroup = $zinc->add('group', 1 , -visible => 1); ####################################################### my $toggle0 = -1; my $hole0 = $zinc->add('arc',$bgroup, [10,35,50,75], -visible => 0 ); my $holeid0 = $zinc->contour($ufo1, 'add',1, $hole0); # will produce a see-thru because $arc3b my $imageid0 = $zinc->add('icon',$bgroup, -image => $imageoff, -position => [10,35], -priority => 1, -tags => 'button', ); $zinc->bind($imageid0,"