From 45b13a34d777859147ce128a4271255e81c8c22c Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 22 Dec 2000 17:01:28 +0000 Subject: *** empty log message *** --- sandbox/local.pl | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 sandbox/local.pl (limited to 'sandbox/local.pl') diff --git a/sandbox/local.pl b/sandbox/local.pl new file mode 100644 index 0000000..ccebad0 --- /dev/null +++ b/sandbox/local.pl @@ -0,0 +1,58 @@ +#!/usr/bin/perl -w + +use Tk; +use Tk::Zinc; + +$mw = MainWindow->new(); +$logo = $mw->Photo(-file => "logo.gif"); +$papier = $mw->Photo(-file => "texture-paper.xpm"); +#$penguin = $mw->Photo(-file => "xpenguin.png"); + +$top = 1; +$zinc = $mw->Zinc(-localrender => 1, -relief => 'sunken'); +$zinc->pack(-expand => 1, -fill => 'both'); +$zinc->configure(-width => 500, -height => 500); +$gr1 = $zinc->add('group', $top); +$clip = $zinc->add('rectangle', $gr1, [50, 50, 399, 399], + -filled => 1, -fillcolor => 'pink', -linewidth => 0); +$zinc->itemconfigure($gr1, -clip => $clip); +$gr2 = $zinc->add('group', $gr1); +$clip2 = $zinc->add('rectangle', $gr2, [200, 200, 450, 450], + -filled => 1, -fillcolor => 'lavender', -linewidth => 0); +#$zinc->itemconfigure($gr2, -clip => $clip2); +$view = $zinc->add('group', $gr2, -tags => "controls"); +$zinc->lower($clip); +$zinc->lower($clip2); + +$rect = $zinc->add('rectangle', $view, [100, 100, 200, 200], + -linewidth => 4, -tile => $papier, + -fillcolor => 'pink', -fillalpha => 128, + -filled => 1); +$fvwm = $zinc->add('icon', $view, + -mask => '@fvwm.xbm', -position => [250, 120], + -anchor => 'center', -color => 'black', + -alpha => 255); +$rect2 = $zinc->add('rectangle', $view, [150, 50, 300, 300], + -linewidth => 0, -tile => $logo, + -fillcolor => 'white', -fillalpha => 90, + -filled => 1); +$x = 100; +$y = 100; +for ($i = 0; $i < 1; $i++) { + $x = $x+3; + $y = $y+3; + $zinc->add('text', $view, + -text => "BlaBla et tout et tout, bref...", + -position => [$x, $y], -anchor => 'nw', + -color => 'red', -alpha => 90); +} +#$peng = $zinc->add('icon', $view, +# -image => $penguin, -position => [300, 300], +# -anchor => 'center', -alpha => 128); +$zinc->translate($rect, -150, -150); +$zinc->rotate($rect, 35); +$zinc->translate($rect, 150, 150); + +#source controls.tcl +# +MainLoop(); -- cgit v1.1