diff options
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/exemple_groupe.pl | 36 | ||||
-rw-r--r-- | doc/user_manual.txt | 23 |
2 files changed, 58 insertions, 1 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; diff --git a/doc/user_manual.txt b/doc/user_manual.txt index e5a3d29..92dbedd 100644 --- a/doc/user_manual.txt +++ b/doc/user_manual.txt @@ -184,6 +184,27 @@ my $contour = new MTools::GUI::MRect (1, 400, 300, 200, 10); my $surface = new MTools::GUI::MRect (1, 400, 400, 200, 20, -filled => 1, -fillcolor => red); mrun; +_________ +MGroup.pm : cet objet permet de regrouper d'autres objets, qui peuvent aussi +être des groupes. Le groupe est vu et manipulé comme un objet unique. +La création nécessite les arguments suivants : + - parent : père de l'objet. + - %options : table de hash passée en paramètre de la création de l'objet + zinc groupe + +Exemple d'utilisation : +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; ________ MClip.pm : l'objet permettant de faire du clipping. Le clipping est une technique qui consiste à réaliser une fenêtre de visualisation. En pratique, @@ -301,6 +322,6 @@ MAntiRecouvrementGroup.pm : 2.7 Les inclassables -MGroup, ptkdb, MObjet, MTimer, MState, MSwitch, MIvy, WacomAdapter +ptkdb, MObjet, MTimer, MState, MSwitch, MIvy, WacomAdapter 2.8 L'utilisation de TkZinc |