From 35c0ddffe17567ac70b1f19d38d5d9f9c557b1f5 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 25 Jan 2002 10:07:25 +0000 Subject: *** empty log message *** --- Perl/debug/.cvsignore | 4 +++ doc/.cvsignore | 2 +- sandbox/lines.pl | 48 +++++++++++++++++++++++++ sandbox/testrect.pl | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++ sandbox/testshape.pl | 29 +++++++++++++++ sandbox/triangles.pl | 66 ++++++++++++++++++++++++++++++++++ 6 files changed, 247 insertions(+), 1 deletion(-) create mode 100644 Perl/debug/.cvsignore create mode 100644 sandbox/lines.pl create mode 100644 sandbox/testrect.pl create mode 100644 sandbox/testshape.pl create mode 100644 sandbox/triangles.pl diff --git a/Perl/debug/.cvsignore b/Perl/debug/.cvsignore new file mode 100644 index 0000000..625327a --- /dev/null +++ b/Perl/debug/.cvsignore @@ -0,0 +1,4 @@ +Makefile +Makefile.old +blib +pm_to_blib diff --git a/doc/.cvsignore b/doc/.cvsignore index 78c0471..302b03f 100644 --- a/doc/.cvsignore +++ b/doc/.cvsignore @@ -9,4 +9,4 @@ refman *.ps *.png *.gif - +_region_.tex 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('
', sub { print "perfs: ", join(',', $zinc->monitor()), "\n" });
+$mw->Tk::bind(' ', sub { print "perfs: ", join(',', $zinc->monitor()), "\n" });
+$mw->Tk::bind('', sub { exit(0); });
+$zinc->focusFollowsMouse();
+MainLoop();
diff --git a/sandbox/testrect.pl b/sandbox/testrect.pl
new file mode 100644
index 0000000..aac1959
--- /dev/null
+++ b/sandbox/testrect.pl
@@ -0,0 +1,99 @@
+#!/usr/bin/perl -w
+
+use Tk;
+use Tk::Zinc;
+
+use Controls;
+
+$mw = MainWindow->new();
+
+
+###################################################
+# creation zinc
+###################################################
+$top = 1;
+$zinc_width = 800;
+$zinc_height = 500;
+
+$zinc = $mw->Zinc(-backcolor => 'gray65', -relief => 'sunken');
+$zinc->pack(-expand => 1, -fill => 'both');
+$zinc->configure(-width => $zinc_width, -height => $zinc_height);
+
+#$zinc->configure(-drawbboxes => 1);
+
+#print "cells ", $zinc->cells(), " visual ", $zinc->visual(), " ", $zinc->visualsavailable(), "\n";
+
+$zinc->scale($top, 1, -1);
+$view = $zinc->add('group', $top, -tags => ["controls"]);
+$zinc->translate($view, 300, -200);
+$view2 = $zinc->add('group', $top);
+$zinc->translate($view2, 100, -50);
+
+
+#$rect0 = $zinc->add('rectangle', $view [100, -105, 200, -305],
+# -filled => t,
+# -fillcolor => "white|cadetblue3");
+
+$color1 = 'darkslateblue';
+$color2 = '#f0ffff';
+$gangle = 0;
+$shades = 8;
+$rect1 = $zinc->add('rectangle', $view, [-50, 100, 50, -100],
+ -filled => 1,
+ -relief => 'flat',
+ -linewidth => 1,
+ -fillpattern => 'AlphaStipple7',
+ -fillcolor => "$color1|$color2/$gangle%$shades");
+#
+# Mire
+$zinc->add('curve', $view, [-10, 0, 10, 0],
+ -linecolor => 'red');
+$zinc->add('curve', $view, [0, -10, 0, 10],
+ -linecolor => 'red');
+
+$handle = $zinc->add('arc', $view, [-3, -106, 3, -112],
+ -filled => 1,
+ -fillcolor => 'red');
+$zinc->bind($handle, '
', sub { exit(0); });
+$zinc->focusFollowsMouse();
+MainLoop();
--
cgit v1.1