aboutsummaryrefslogtreecommitdiff
path: root/sandbox/lines.pl
diff options
context:
space:
mode:
authorlecoanet2002-01-25 10:07:25 +0000
committerlecoanet2002-01-25 10:07:25 +0000
commit35c0ddffe17567ac70b1f19d38d5d9f9c557b1f5 (patch)
tree29af499c39941b2a3741cc44379891d45388596d /sandbox/lines.pl
parentd3df91149969d09b3a805a6468d85efcab77cc75 (diff)
downloadtkzinc-35c0ddffe17567ac70b1f19d38d5d9f9c557b1f5.zip
tkzinc-35c0ddffe17567ac70b1f19d38d5d9f9c557b1f5.tar.gz
tkzinc-35c0ddffe17567ac70b1f19d38d5d9f9c557b1f5.tar.bz2
tkzinc-35c0ddffe17567ac70b1f19d38d5d9f9c557b1f5.tar.xz
*** empty log message ***
Diffstat (limited to 'sandbox/lines.pl')
-rw-r--r--sandbox/lines.pl48
1 files changed, 48 insertions, 0 deletions
diff --git a/sandbox/lines.pl b/sandbox/lines.pl
new file mode 100644
index 0000000..d4ca52d
--- /dev/null
+++ b/sandbox/lines.pl
@@ -0,0 +1,48 @@
+#!/usr/bin/perl -w
+
+use Tk;
+use Tk::Zinc;
+
+#!/usr/bin/perl -w
+
+use Tk;
+use Tk::Zinc;
+use Controls;
+use Tk::Photo;
+require Tk::PNG;
+
+$mw = MainWindow->new();
+$logo = $mw->Photo(-file => "logo.gif");
+$papier = $mw->Photo(-file => "texture-paper.xpm");
+$penguin = $mw->Photo(-format => 'png',
+ -file => "xpenguin.png");
+
+$top = 1;
+$zinc = $mw->Zinc(-render => 1,
+ -borderwidth => 0,
+ -highlightthickness => 0,
+ -relief => 'sunken',
+ -takefocus => 1,
+# -tile => $papier
+ );
+$zinc->pack(-expand => 1, -fill => 'both');
+$zinc->configure(-width => 500, -height => 500);
+
+$view = $zinc->add('group', $top, -tags => "controls");
+$mp3 = $zinc->add('curve', $view, [20, 280, 100, 430, 200, 430],
+ -linewidth => 9,
+ -closed => 0,
+ -linestyle => 'dashed',
+ -joinstyle => 'round',
+# -firstend => [3, 12, 8],
+# -lastend => "12 12 8",
+ -capstyle => 'round',
+ -linecolor => 'red',
+ -linealpha => 100);
+
+new Controls($zinc);
+$mw->Tk::bind('<p>', sub { print "perfs: ", join(',', $zinc->monitor()), "\n" });
+$mw->Tk::bind('<t>', sub { $zinc->remove($arc); });
+$mw->Tk::bind('<q>', sub { exit(0); });
+$zinc->focusFollowsMouse();
+MainLoop();