Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8332950

ArcTo xAxisRotation fails to draw the arc when xAxisRotation is strictly zero

XMLWordPrintable

    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      Linux Mint 21.2

      A DESCRIPTION OF THE PROBLEM :
      If the xAxisRotation property is strictly zero the arc can not be drawn, the arc end point is ignored, and the path go from the arc start point to the next point after the arc.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      See the attached code, otherwise it works with more simple coordinates

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      An half circle stuck to a rectangle
      ACTUAL -
      A triangle

      ---------- BEGIN SOURCE ----------
      Path p = new Path();
      ArcTo a = new ArcTo();
      a.setX(113.8233880241887);
      a.setY(316.3783247347362);
      a.setSweepFlag(false);
      a.setLargeArcFlag(false);
      a.setRadiusX(9.5);
      a.setRadiusY(9.5);
      p.setStroke(null);
      p.setFill(Color.BLACK);
      p.getElements().add(new MoveTo(119.83171557850895, 334.4033073976959));
      p.getElements().add(a);
      p.getElements().add(new LineTo(63.99583622283988, 332.98750866852015));
      p.getElements().add(new LineTo(70.00416377716013, 351.01249133147985));
      p.getElements().add(new ClosePath());
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      a.setXAxisRotation(0.1); // works
      a.setXAxisRotation(0.00000000000001); // works
      a.setXAxisRotation(Double.MIN_VALUE); // doesn't work
      a.setXAxisRotation(0); // doesn't work

      FREQUENCY : occasionally


        1. Test.java
          1 kB
        2. screenshot.png
          screenshot.png
          45 kB
        3. expected.png
          expected.png
          46 kB

            jdv Jayathirth D V
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: