Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-1014

Valid input arcs produce non-rendered SVG arcs

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: SVGGraphics2D
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: PC

      Description

      In some situations, pie charts produced using JFreeChart and SVGGraphics2D are rendered empty. Root cause is that the SVG spec states that elliptical arcs with identical start and end point are omitted (http://www.w3.org/TR/SVG11/implnote.html#ArcOutOfRangeParameters).

      However, the input Arc2D is ok, it is rendered perfectly e.g. to a bitmap image. The attached code sample produces both bitmap and SVG.

      Increasing the numeric precision may help, but does not solve the problem. There will be a case in which rounding effects will lead to identical start and end points.

      A possible approach could be to switch to circle based on the rounded points (SVGGraphics2D switches to circle if the Arc2D describes a perfect circle).

        Attachments

        1. AlmostCircleArc.java
          2 kB
          rolf.sigg

          Activity

            People

            • Assignee:
              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              Reporter:
              rolf.sigg@ergon.ch rolf.sigg
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: