Class EllipticalCurveTo.EllipseArc

  • Enclosing class:
    EllipticalCurveTo

    static class EllipticalCurveTo.EllipseArc
    extends java.lang.Object
    Converts between two types of definitions of an arc: The input is an arc defined by two points and the two semi-axes of the ellipse. The output is an arc defined by a bounding rectangle, the starting angle, and the angular extent of the ellipse that is to be drawn. The output is an intermediate step to calculating the Bézier curve(s) that approximate(s) the elliptical arc, which happens in PdfCanvas.
    • Field Detail

      • startAng

        final double startAng
      • extent

        final double extent
    • Constructor Detail

      • EllipseArc

        EllipseArc​(Point center,
                   double a,
                   double b,
                   double startAng,
                   double extent)
    • Method Detail

      • calculatePossibleMiddle

        static EllipticalCurveTo.EllipseArc calculatePossibleMiddle​(Point start,
                                                                    Point end,
                                                                    double a,
                                                                    double b,
                                                                    double startToCenterAngle,
                                                                    boolean sweep,
                                                                    boolean largeArc)
      • calculateAngle

        static double calculateAngle​(Point pt,
                                     Point center,
                                     double a,
                                     double b)
      • toDegrees

        static double toDegrees​(double radians)