Re: Not really understand on subclassing



Hi.

I never really used GooCanvas, but I think this code:

######################################
my $elem = test::CanvasExpand->new(
ÂÂÂ $root, 100, 100, 400, 400,
ÂÂÂ 'line-width'ÂÂ => 10,
ÂÂÂ 'radius-x'ÂÂÂÂ => 20,
ÂÂÂ 'radius-y'ÂÂÂÂ => 10,
ÂÂÂ 'stroke-color' => 'yellow',
ÂÂÂ 'fill-color'ÂÂ => 'red'
);
######################################

should look something like this:

#######################################
my $elem = test::CanvasExpand->new(
    'x' => 100,
    'y' => 100,
    'width' => 400,
    'height' => 400,
    'radius-x' => 20,
    'radius-y' => 10,
    'stroke-color' => 'yellow',
    'fill-color' => 'red',
    'parent' => $root
);
#######################################

Not sure what your $root variable stands for there, so I assumed that
this is parent of your item.

Tadej

-- 
Tadej BorovÅak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]