You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Archie Cobbs <ar...@dellroad.org> on 2005/06/17 17:15:56 UTC

SVGGenerator bug ?

Is this a bug in Batik's SVG generator?

I'm drawing an arc. If the arc is < 360 degrees, things work normally.
If the arc is 360 degrees, nothing is displayed.

The attached program demonstrates the problem. Change the definition
of "DEGREES" to see the behavior change.

Note: this is using Batik 1.6 plus the patch that fixed the previous
arc bug (where the arc was drawn on the wrong side of the curve).

Thanks,
-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

Re: SVGGenerator bug ?

Posted by Cameron McCormack <ca...@aka.mcc.id.au>.
Archie Cobbs:
> Great!!
> 
> Could you point me at the file(s) that got changed so I can
> extract the patch?

It's sources/org/apache/batik/svggen/SVGArc.java.

-- 
  e-mail : cam (at) mcc.id.au    	icq : 26955922
     web : http://mcc.id.au/	        msn : cam-msn (at) aka.mcc.id.au
  office : +61399055779		     jabber : heycam (at) jabber.org

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: SVGGenerator bug ?

Posted by Archie Cobbs <ar...@dellroad.org>.
Cameron McCormack wrote:
>>Yes, Java2D draws a circle in this case. Your analysis sounds
>>like the likely cause.
> 
> Fix is in CVS now.

Great!!

Could you point me at the file(s) that got changed so I can
extract the patch?

Thanks,
-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: SVGGenerator bug ?

Posted by Cameron McCormack <ca...@aka.mcc.id.au>.
Archie Cobbs:
> Yes, Java2D draws a circle in this case. Your analysis sounds
> like the likely cause.

Fix is in CVS now.

-- 
  e-mail : cam (at) mcc.id.au    	icq : 26955922
     web : http://mcc.id.au/	        msn : cam-msn (at) aka.mcc.id.au
  office : +61399055779		     jabber : heycam (at) jabber.org

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: SVGGenerator bug ?

Posted by Archie Cobbs <ar...@dellroad.org>.
Cameron McCormack wrote:
> According to
> 
>   http://www.w3.org/TR/SVG11/implnote.html#ArcOutOfRangeParameters
> 
> in SVG if an elliptical arc path segment has its end-point and
> start-point the same, then the path segment should be omitted.  I
> suspect that this 360 degree arc you are drawing is being converted into
> such a path segment.
> 
> Does Java2D display 360 degree arcs normally?  If so, the SVGGraphics2D
> should generate a 'circle' element instead of a 'path' element in this
> case.

Yes, Java2D draws a circle in this case. Your analysis sounds
like the likely cause.

Thanks,
-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: SVGGenerator bug ?

Posted by Cameron McCormack <ca...@aka.mcc.id.au>.
Hi Archie.

Archie Cobbs:
> Is this a bug in Batik's SVG generator?
> 
> I'm drawing an arc. If the arc is < 360 degrees, things work normally.
> If the arc is 360 degrees, nothing is displayed.
> 
> The attached program demonstrates the problem. Change the definition
> of "DEGREES" to see the behavior change.
> 
> Note: this is using Batik 1.6 plus the patch that fixed the previous
> arc bug (where the arc was drawn on the wrong side of the curve).

According to

  http://www.w3.org/TR/SVG11/implnote.html#ArcOutOfRangeParameters

in SVG if an elliptical arc path segment has its end-point and
start-point the same, then the path segment should be omitted.  I
suspect that this 360 degree arc you are drawing is being converted into
such a path segment.

Does Java2D display 360 degree arcs normally?  If so, the SVGGraphics2D
should generate a 'circle' element instead of a 'path' element in this
case.

Cameron

-- 
  e-mail : cam (at) mcc.id.au    	icq : 26955922
     web : http://mcc.id.au/	        msn : cam-msn (at) aka.mcc.id.au
  office : +61399055779		     jabber : heycam (at) jabber.org

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org