src/java.desktop/share/classes/java/awt/geom/Arc2D.java

Print this page




  43  * the center of the ellipse to the upper right corner of the framing
  44  * rectangle.
  45  * As a result, if the framing rectangle is noticeably longer along one
  46  * axis than the other, the angles to the start and end of the arc segment
  47  * will be skewed farther along the longer axis of the frame.
  48  * </a>
  49  * <p>
  50  * The actual storage representation of the coordinates is left to
  51  * the subclass.
  52  *
  53  * @author      Jim Graham
  54  * @since 1.2
  55  */
  56 public abstract class Arc2D extends RectangularShape {
  57 
  58     /**
  59      * The closure type for an open arc with no path segments
  60      * connecting the two ends of the arc segment.
  61      * @since 1.2
  62      */
  63     public final static int OPEN = 0;
  64 
  65     /**
  66      * The closure type for an arc closed by drawing a straight
  67      * line segment from the start of the arc segment to the end of the
  68      * arc segment.
  69      * @since 1.2
  70      */
  71     public final static int CHORD = 1;
  72 
  73     /**
  74      * The closure type for an arc closed by drawing straight line
  75      * segments from the start of the arc segment to the center
  76      * of the full ellipse and from that point to the end of the arc segment.
  77      * @since 1.2
  78      */
  79     public final static int PIE = 2;
  80 
  81     /**
  82      * This class defines an arc specified in {@code float} precision.
  83      * @since 1.2
  84      */
  85     public static class Float extends Arc2D implements Serializable {
  86         /**
  87          * The X coordinate of the upper-left corner of the framing
  88          * rectangle of the arc.
  89          * @since 1.2
  90          * @serial
  91          */
  92         public float x;
  93 
  94         /**
  95          * The Y coordinate of the upper-left corner of the framing
  96          * rectangle of the arc.
  97          * @since 1.2
  98          * @serial
  99          */




  43  * the center of the ellipse to the upper right corner of the framing
  44  * rectangle.
  45  * As a result, if the framing rectangle is noticeably longer along one
  46  * axis than the other, the angles to the start and end of the arc segment
  47  * will be skewed farther along the longer axis of the frame.
  48  * </a>
  49  * <p>
  50  * The actual storage representation of the coordinates is left to
  51  * the subclass.
  52  *
  53  * @author      Jim Graham
  54  * @since 1.2
  55  */
  56 public abstract class Arc2D extends RectangularShape {
  57 
  58     /**
  59      * The closure type for an open arc with no path segments
  60      * connecting the two ends of the arc segment.
  61      * @since 1.2
  62      */
  63     public static final int OPEN = 0;
  64 
  65     /**
  66      * The closure type for an arc closed by drawing a straight
  67      * line segment from the start of the arc segment to the end of the
  68      * arc segment.
  69      * @since 1.2
  70      */
  71     public static final int CHORD = 1;
  72 
  73     /**
  74      * The closure type for an arc closed by drawing straight line
  75      * segments from the start of the arc segment to the center
  76      * of the full ellipse and from that point to the end of the arc segment.
  77      * @since 1.2
  78      */
  79     public static final int PIE = 2;
  80 
  81     /**
  82      * This class defines an arc specified in {@code float} precision.
  83      * @since 1.2
  84      */
  85     public static class Float extends Arc2D implements Serializable {
  86         /**
  87          * The X coordinate of the upper-left corner of the framing
  88          * rectangle of the arc.
  89          * @since 1.2
  90          * @serial
  91          */
  92         public float x;
  93 
  94         /**
  95          * The Y coordinate of the upper-left corner of the framing
  96          * rectangle of the arc.
  97          * @since 1.2
  98          * @serial
  99          */