aboutsummaryrefslogtreecommitdiff
path: root/sandbox/local.pl
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/local.pl')
-rw-r--r--sandbox/local.pl58
1 files changed, 58 insertions, 0 deletions
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();