aboutsummaryrefslogtreecommitdiff
path: root/Perl
diff options
context:
space:
mode:
Diffstat (limited to 'Perl')
-rw-r--r--Perl/Zinc/Logo.pm46
-rw-r--r--Perl/demos/Tk/demos/zinc_lib/Zetris.pl7
-rw-r--r--Perl/demos/Tk/demos/zinc_lib/tkZincLogo.pl4
3 files changed, 51 insertions, 6 deletions
diff --git a/Perl/Zinc/Logo.pm b/Perl/Zinc/Logo.pm
index 5e9db69..b83155f 100644
--- a/Perl/Zinc/Logo.pm
+++ b/Perl/Zinc/Logo.pm
@@ -16,7 +16,7 @@ use strict;
use Carp;
use Math::Trig;
-Construct Tk::Widget 'Tk::Zinc::Logo';
+Construct Tk::Widget 'ZincLogo';
my @Gradiants;
@@ -184,4 +184,48 @@ sub ajustLineWidth {
1;
+__END__
+
+=head1 NAME
+
+Tk::Zinc::Logo - a perl module for drawing the TkZinc logo.
+
+
+=head1 SYNOPSIS
+
+ use Tk::Zinc::Logo;
+ my $zinc = MainWindow->new()->Zinc()->pack;
+ my $logo = $zinc->ZincLogo([options]);
+
+
+
+=head1 OPTIONS
+
+=over
+
+=item B<-parent> => zinc group
+
+Specify the parent group. Default is 1.
+
+=item B<-position> => [x, y]
+
+Specify the relative position of the logo in its parent group. Default is [0, 0].
+
+=item B<-priority> => integer
+
+Specify the priority of the logo in its parent group. Default is 500.
+
+=item B<-scale> => [sx, sy]
+
+Scecify the xscale and yscale factors of the logo. Default is [1, 1].
+
+
+=back
+
+
+=head1 AUTEUR
+
+Jean-Luc Vinot <vinot@cena.fr>
+
+
diff --git a/Perl/demos/Tk/demos/zinc_lib/Zetris.pl b/Perl/demos/Tk/demos/zinc_lib/Zetris.pl
index bd0ce94..1f17106 100644
--- a/Perl/demos/Tk/demos/zinc_lib/Zetris.pl
+++ b/Perl/demos/Tk/demos/zinc_lib/Zetris.pl
@@ -66,7 +66,7 @@
use Tk;
use Tk::Zinc;
use strict;
-use LogoZinc;
+use Tk::Zinc::Logo;
package main;
@@ -253,8 +253,9 @@ $tetris->add('rectangle',
-visible => 1);
my $group = $tetris->add('group', 1, );
-my $logo = $tetris->LogoZinc(-parent => $group,
- -position => [$step_x*($width-2)/2-200, $step_y*($height-1)/2],
+my $logo = $tetris->ZincLogo(-parent => $group,
+ -position => [$step_x*($width-2)/2-200,
+ $step_y*($height-1)/2],
);
$tetris->lower($group);
diff --git a/Perl/demos/Tk/demos/zinc_lib/tkZincLogo.pl b/Perl/demos/Tk/demos/zinc_lib/tkZincLogo.pl
index 98ef310..eacd57c 100644
--- a/Perl/demos/Tk/demos/zinc_lib/tkZincLogo.pl
+++ b/Perl/demos/Tk/demos/zinc_lib/tkZincLogo.pl
@@ -6,7 +6,7 @@
use Tk;
use Tk::Zinc;
use strict;
-use LogoZinc; # this module implements a class which instances are Zinc logo!
+use Tk::Zinc::Logo; # this module implements a class which instances are Zinc logo!
package tkZincLogo; # for avoiding symbol collision between different demos
@@ -36,7 +36,7 @@ my $zinc = $mw->Zinc(-width => 350, -height => 250,
my $group = $zinc->add('group', 1, );
-my $logo = $zinc->LogoZinc(-parent => $group,
+my $logo = $zinc->ZincLogo(-parent => $group,
-position => [40, 70],
-priority => 800,
-scale => [.6, .6],