Class SvgPath2D

All Implemented Interfaces:
Shape, Serializable, Cloneable

public class SvgPath2D extends Path2D.Double
SvgPath2D adds an arcTo method to Path2D.Double.
Author:
Werner Randelshofer
See Also:
  • Constructor Details

    • SvgPath2D

      public SvgPath2D()
  • Method Details

    • arcTo

      public void arcTo(double rx, double ry, double xAxisRotation, double x, double y, boolean largeArcFlag, boolean sweepFlag)
      Adds an elliptical arc, defined by two radii, an angle from the x-axis, a flag to choose the large arc or not, a flag to indicate if we increase or decrease the angles and the final point of the arc.

      As specified in w3.org

      Parameters:
      rx - the x radius of the ellipse
      ry - the y radius of the ellipse
      xAxisRotation - the angle from the x-axis of the current coordinate system to the x-axis of the ellipse in degrees.
      x - the absolute x coordinate of the final point of the arc.
      y - the absolute y coordinate of the final point of the arc.
      largeArcFlag - the large arc flag. If true the arc spanning less than or equal to 180 degrees is chosen, otherwise the arc spanning greater than 180 degrees is chosen
      sweepFlag - the sweep flag. If true the line joining center to arc sweeps through decreasing angles otherwise it sweeps through increasing angles