aboutsummaryrefslogtreecommitdiff
path: root/doc/exemple_groupe.pl
diff options
context:
space:
mode:
authorribet2007-05-14 15:03:56 +0000
committerribet2007-05-14 15:03:56 +0000
commitfcc47ce35b08fa62999c1aa1230dacec446031e9 (patch)
tree3eea297e1bbdecee65f0d3d76fcd0d5d6a670ab6 /doc/exemple_groupe.pl
parent95ba2d44fffe340619c5fdf5624790ac64442d80 (diff)
downloadmtc-fcc47ce35b08fa62999c1aa1230dacec446031e9.zip
mtc-fcc47ce35b08fa62999c1aa1230dacec446031e9.tar.gz
mtc-fcc47ce35b08fa62999c1aa1230dacec446031e9.tar.bz2
mtc-fcc47ce35b08fa62999c1aa1230dacec446031e9.tar.xz
Documentation de MGroup
Diffstat (limited to 'doc/exemple_groupe.pl')
-rwxr-xr-xdoc/exemple_groupe.pl36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/exemple_groupe.pl b/doc/exemple_groupe.pl
new file mode 100755
index 0000000..8b70a05
--- /dev/null
+++ b/doc/exemple_groupe.pl
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU GPL General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA,
+# or refer to http://www.gnu.org/copyleft/gpl.html
+#
+
+BEGIN {
+ unshift @INC, ".", "../src";
+}
+
+use Math::Trig;
+use MTools;
+use MTools::GUI::MRect;
+use MTools::GUI::MGroup;
+
+new MTools (800, 600, "Exemple de groupe");
+
+my $group = new MTools::GUI::MGroup (1);
+my $contour = new MTools::GUI::MRect ($group, 400, 300, 200, 10);
+my $surface = new MTools::GUI::MRect ($group, 400, 400, 200, 20,
+ -filled => 1, -fillcolor => red);
+clone($group);
+$group->rotate(pi/4, 400, 300);
+
+mrun;