aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/exemple_circle.pl31
-rwxr-xr-xdoc/exemple_clip.pl36
-rwxr-xr-xdoc/exemple_curve.pl32
-rwxr-xr-xdoc/exemple_image.pl30
-rwxr-xr-xdoc/exemple_rect.pl31
-rw-r--r--doc/plan.pngbin0 -> 29434 bytes
-rw-r--r--doc/user_manual.txt42
7 files changed, 197 insertions, 5 deletions
diff --git a/doc/exemple_circle.pl b/doc/exemple_circle.pl
new file mode 100755
index 0000000..290bec4
--- /dev/null
+++ b/doc/exemple_circle.pl
@@ -0,0 +1,31 @@
+#!/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 MTools;
+use MTools::GUI::MCircle;
+
+
+new MTools (800, 600, "Exemple de cercle");
+
+my $cercle = new MTools::GUI::MCircle (1, 400, 300, 200);
+my $disque = new MTools::GUI::MCircle (1, 400, 300, 200, -filled => 1, -fillcolor => red);
+
+mrun;
diff --git a/doc/exemple_clip.pl b/doc/exemple_clip.pl
new file mode 100755
index 0000000..8184e36
--- /dev/null
+++ b/doc/exemple_clip.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 MTools;
+use MTools::MGroup;
+use MTools::GUI::MCircle;
+use MTools::GUI::MRect;
+use MTools::GUI::MClip;
+
+new MTools (800, 600, "Exemple de clip");
+
+my $fenetre = new MTools::MGroup (1);
+my $disque = new MTools::GUI::MCircle ($fenetre, 400, 300, 100, -filled => 1);
+my $trou = new MTools::GUI::MRect ($fenetre, 250, 300, 100, 60);
+
+new MTools::GUI::MClip ($fenetre, $trou);
+
+mrun;
diff --git a/doc/exemple_curve.pl b/doc/exemple_curve.pl
new file mode 100755
index 0000000..58fcecc
--- /dev/null
+++ b/doc/exemple_curve.pl
@@ -0,0 +1,32 @@
+#!/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 MTools;
+use MTools::GUI::MCurve;
+
+new MTools (800, 600, "Exemple de curve bémol");
+
+my $b = new MTools::GUI::MCurve(1, [[100, 100], [100, 300], # barre verticale
+ [200, 300, 'c'], # bas de l'arrondi
+ [200, 200, 'c'], # haut de l'arrondi
+ [100, 250]], -linewidth => 3);# point d'accroche
+
+mrun;
diff --git a/doc/exemple_image.pl b/doc/exemple_image.pl
new file mode 100755
index 0000000..3863a3a
--- /dev/null
+++ b/doc/exemple_image.pl
@@ -0,0 +1,30 @@
+#!/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 MTools;
+use MTools::GUI::MImage;
+
+
+new MTools (800, 600, "Exemple d'image");
+
+my $image = new MTools::GUI::MImage (1, "plan.png");
+
+mrun;
diff --git a/doc/exemple_rect.pl b/doc/exemple_rect.pl
new file mode 100755
index 0000000..5b0d44d
--- /dev/null
+++ b/doc/exemple_rect.pl
@@ -0,0 +1,31 @@
+#!/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 MTools;
+use MTools::GUI::MRect;
+
+
+new MTools (800, 600, "Exemple de rectangle");
+
+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;
diff --git a/doc/plan.png b/doc/plan.png
new file mode 100644
index 0000000..f471e00
--- /dev/null
+++ b/doc/plan.png
Binary files differ
diff --git a/doc/user_manual.txt b/doc/user_manual.txt
index 714dfdd..59faad9 100644
--- a/doc/user_manual.txt
+++ b/doc/user_manual.txt
@@ -181,7 +181,8 @@ use MTools;
use MTools::GUI::MRect;
new MTools (800, 600, "Exemple de rectangle");
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);
+my $surface = new MTools::GUI::MRect (1, 400, 400, 200, 20,
+ -filled => 1, -fillcolor => red);
mrun;
________
MClip.pm : l'objet permettant de faire du clipping. Le clipping est une
@@ -209,15 +210,46 @@ my $trou = new MTools::GUI::MRect ($fenetre, 250, 300, 100, 60);
new MTools::GUI::MClip ($fenetre, $trou);
mrun;
_________
-MCurve.pm :
-_________________________
-MAntiRecouvrementGroup.pm :
+MCurve.pm : l'objet curve permet de réaliser une forme quelconque, composée de
+segments et de courbes de Bézier.
+La création nécessite les arguments suivants :
+ - parent : père de l'objet.
+ - coords : coordonnées de la curve (cf. format zinc)
+ - %options : table de hash passée en paramètre de la création de l'objet
+ zinc curve
+
+Exemple d'utilisation :
+use MTools;
+use MTools::GUI::MCurve;
+new MTools (800, 600, "Exemple de curve bémol");
+my $b = new MTools::GUI::MCurve(1, [[100, 100], [100, 300], # barre verticale
+ [200, 300, 'c'], # bas de l'arrondi
+ [200, 200, 'c'], # haut de l'arrondi
+ [100, 250]],-linewidth=>3);#point d'accroche
+mrun;
+
_________
-MImage.pm :
+MImage.pm : l'objet image permet de charger une image à partir d'un fichier.
+Actuellement, MImage gère les images au format png. Les autres formats marchent
+probablement, à vérifier*** (à moins que ce soit pour les svg).
+La création nécessite les arguments suivants :
+ - parent : père de l'objet.
+ - image : nom de l'image
+ - %options : table de hash passée en paramètre de la création de l'objet
+ zinc icon
+
+Exemple d'utilisation :
+use MTools;
+use MTools::GUI::MImage;
+new MTools (800, 600, "Exemple d'image");
+my $image = new MTools::GUI::MImage (1, "plan.png");
+mrun;
________
MText.pm :
___________
MTexture.pm :
+_________________________
+MAntiRecouvrementGroup.pm :
2.2 Le SVG