Subject: | line method doesn't carry over style from its group |
Date: | Sun, 2 Aug 2009 13:20:47 -0700 |
To: | bug-SVG [...] rt.cpan.org |
From: | Rob Duarte <rahji [...] rahji.com> |
I apologize if this is just a problem with my lack of knowledge of the
SVG standard, but from the example in SVG::Manual that shows
primitives inheriting style attributes from their group, I assumed
that the same would be true for lines. This doesn't seem to be the
case.
The following code works as expected:
my $tag = $svg->line(
id => 'line1',
x1 => 0, y1 => 0,
x2 => 90, y2 => 0,
style => { 'stroke' => 'black' }
);
while this version creates a line with no stroke color (instead of
black, as expected):
my $y = $svg->group(
id => 'group_y',
style => { 'stroke' => 'black' }
);
$y = $svg->line(
id => 'line1',
x1 => 0, y1 => 0,
x2 => 90, y2 => 0
);
other methods work as expected - circle() for example - ie: they
inherit the style from the group.
Let me know if you need any more information from me. Thanks!
Rob
SVG-2.49
perl 5.8.8
Mac OS 10.5.7
Darwin crazyeyeskilla 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31
22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386