Skip Menu |

This queue is for tickets about the SVG CPAN distribution.

Report information
The Basics
Id: 48375
Status: resolved
Priority: 0/
Queue: SVG

People
Owner: Nobody in particular
Requestors: rahji [...] rahji.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Subject: Re: [rt.cpan.org #48375] line method doesn't carry over style from its group
Date: Mon, 3 Aug 2009 21:03:07 -0700
To: bug-SVG [...] rt.cpan.org
From: Ronan Oger <ronan.oger [...] roitsystems.com>
Hi Rob, This is a user error, not a bug. In your example below you generate an svg document with a group at its root, and then with a line as sibling to the group. Hence, it makes sense that the line properties do not get propagated to the group. Wrong: my $y = $svg->group( id => 'group_y', style => { 'stroke' => 'black' } ); $y = $svg->line( id => 'line1', x1 => 0, y1 => 0, x2 => 90, y2 => 0 ); Right: my $y = $svg->group( id => 'group_y', style => { 'stroke' => 'black' } ); $y->line( id => 'line1', x1 => 0, y1 => 0, x2 => 90, y2 => 0 ); Ronan On Sunday 02 August 2009 01:21:26 pm Rob Duarte via RT wrote: Show quoted text
> Sun Aug 02 16:21:25 2009: Request 48375 was acted upon. > Transaction: Ticket created by rahji@rahji.com > Queue: SVG > Subject: line method doesn't carry over style from its group > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: rahji@rahji.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=48375 > > > > 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
c
Subject: Re: [rt.cpan.org #48375] line method doesn't carry over style from its group
Date: Mon, 3 Aug 2009 22:54:52 -0700
To: bug-SVG [...] rt.cpan.org
From: Rob Duarte <rahji [...] rahji.com>
got it. sorry for the false alarm. thank you rob On Aug 3, 2009, at 8:54 PM, ronan.oger@roitsystems.com via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=48375 > > > Hi Rob, > > This is a user error, not a bug. > > In your example below you generate an svg document with a group at > its root, > and then with a line as sibling to the group. Hence, it makes sense > that the > line properties do not get propagated to the group. > > > Wrong: > my $y = $svg->group( > id => 'group_y', > style => { 'stroke' => 'black' } > ); > $y = $svg->line( > id => 'line1', > x1 => 0, y1 => 0, > x2 => 90, y2 => 0 > ); > > Right: > my $y = $svg->group( > id => 'group_y', > style => { 'stroke' => 'black' } > ); > $y->line( > id => 'line1', > x1 => 0, y1 => 0, > x2 => 90, y2 => 0 > ); > > Ronan > > > On Sunday 02 August 2009 01:21:26 pm Rob Duarte via RT wrote:
>> Sun Aug 02 16:21:25 2009: Request 48375 was acted upon. >> Transaction: Ticket created by rahji@rahji.com >> Queue: SVG >> Subject: line method doesn't carry over style from its group >> Broken in: (no value) >> Severity: (no value) >> Owner: Nobody >> Requestors: rahji@rahji.com >> Status: new >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=48375 > >> >> >> 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
> c >