#!/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 widgets $zinc->itemconfigure(1, -clip => $petal); my $petal1 = $zinc->add('curve',1,[[$width/2,$height], [-2*$width,-100, 'c'], [3*$width,-100, 'c'], [$width/2,$height]], -tags => ['bezier1'], -filled => 1, -fillcolor => 'cyan', -closed => 1, -linewidth => 0, -priority => 1, -visible => 1, ); &Tk::MainLoop;