aboutsummaryrefslogtreecommitdiff
path: root/Perl/Zinc/Logo.pm
diff options
context:
space:
mode:
authoretienne2003-06-24 12:45:44 +0000
committeretienne2003-06-24 12:45:44 +0000
commit8b26b4c2416759094fe34ba80595a5588e706f5f (patch)
tree59f04ed50dcb3c7cb2a12c7ed8662b1f25147705 /Perl/Zinc/Logo.pm
parenta5226e6d70495710f122f517db617e5a2f0f3b51 (diff)
downloadtkzinc-8b26b4c2416759094fe34ba80595a5588e706f5f.zip
tkzinc-8b26b4c2416759094fe34ba80595a5588e706f5f.tar.gz
tkzinc-8b26b4c2416759094fe34ba80595a5588e706f5f.tar.bz2
tkzinc-8b26b4c2416759094fe34ba80595a5588e706f5f.tar.xz
Mise � jour instanciation du logo
Tk:Zinc::Logo->new(-widget => $zinc, ...) remplace $zinc->ZincLogo(...)
Diffstat (limited to 'Perl/Zinc/Logo.pm')
-rw-r--r--Perl/Zinc/Logo.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/Perl/Zinc/Logo.pm b/Perl/Zinc/Logo.pm
index b83155f..b601f0d 100644
--- a/Perl/Zinc/Logo.pm
+++ b/Perl/Zinc/Logo.pm
@@ -16,8 +16,6 @@ use strict;
use Carp;
use Math::Trig;
-Construct Tk::Widget 'ZincLogo';
-
my @Gradiants;
@@ -94,13 +92,15 @@ my %builder = (-gradset => {'logoshape' => '=axial 270 |#ffffff;100 0 28|#66848c
sub new {
my $proto = shift;
my $type = ref($proto) || $proto;
- my $widget = shift;
my %params = @_;
my $self = {};
bless ($self, $type);
-
- $self->{'-widget'} = $widget;
+ if (exists $params{'-widget'}) {
+ $self->{'-widget'} = $params{'-widget'};
+ } else {
+ croak "in Tk::Zinc::Logo constructor, the -widget attribute must be defined\n";
+ }
$self->{'-parent'} = (exists $params{'-parent'}) ? $params{'-parent'} : 1;
$self->{'-priority'} = (exists $params{'-priority'}) ? $params{'-priority'} : 500;
$self->{'-position'} = (exists $params{'-position'}) ? $params{'-position'} : [0, 0];