/** * Draws the outline of a circular or elliptical arc * covering the specified rectangle. * <p> * The resulting arc begins at <code>startAngle</code> and extends * for <code>arcAngle</code> degrees, using the current color. * Angles are interpreted such that 0 degrees * is at the 3 o'clock position. * A positive value indicates a counter-clockwise rotation * while a negative value indicates a clockwise rotation. * <p> * The center of the arc is the center of the rectangle whose origin * is (<i>x</i>, <i>y</i>) and whose size is specified by the * <code>width</code> and <code>height</code> arguments. * <p> * The resulting arc covers an area * <code>width + 1</code> pixels wide * by <code>height + 1</code> pixels tall. * <p> * The angles are specified relative to the non-square extents of * the bounding rectangle such that 45 degrees always falls on the * line from the center of the ellipse to the upper right corner of * the bounding rectangle. As a result, if the bounding rectangle is * noticeably longer in one axis than the other, the angles to the * start and end of the arc segment will be skewed farther along the * longer axis of the bounds. * @param x the <i>x</i> coordinate of the * upper-left corner of the arc to be Drawn. * @param y the <i>y</i> coordinate of the * upper-left corner of the arc to be Drawn. * @param width the width of the arc to be Drawn. * @param height the height of the arc to be Drawn. * @param startAngle the beginning angle. * @param arcAngle the angular extent of the arc, * relative to the start angle. * @see java.awt.Graphics#FillArc */ public void DrawArc(int x, int y, int width, int height, int startAngle, int arcAngle) { Arc2D arc = new Arc2D.Float(x, y, width, height, startAngle, arcAngle, Arc2D.OPEN); Draw(arc); }
/** * Fills a circular or elliptical arc covering the specified rectangle. * <p> * The resulting arc begins at <code>startAngle</code> and extends * for <code>arcAngle</code> degrees. * Angles are interpreted such that 0 degrees * is at the 3 o'clock position. * A positive value indicates a counter-clockwise rotation * while a negative value indicates a clockwise rotation. * <p> * The center of the arc is the center of the rectangle whose origin * is (<i>x</i>, <i>y</i>) and whose size is specified by the * <code>width</code> and <code>height</code> arguments. * <p> * The resulting arc covers an area * <code>width + 1</code> pixels wide * by <code>height + 1</code> pixels tall. * <p> * The angles are specified relative to the non-square extents of * the bounding rectangle such that 45 degrees always falls on the * line from the center of the ellipse to the upper right corner of * the bounding rectangle. As a result, if the bounding rectangle is * noticeably longer in one axis than the other, the angles to the * start and end of the arc segment will be skewed farther along the * longer axis of the bounds. * @param x the <i>x</i> coordinate of the * upper-left corner of the arc to be Filled. * @param y the <i>y</i> coordinate of the * upper-left corner of the arc to be Filled. * @param width the width of the arc to be Filled. * @param height the height of the arc to be Filled. * @param startAngle the beginning angle. * @param arcAngle the angular extent of the arc, * relative to the start angle. * @see java.awt.Graphics#drawArc */ public void FillArc(int x, int y, int width, int height, int startAngle, int arcAngle){ Arc2D arc = new Arc2D.Float(x, y, width, height, startAngle, arcAngle, Arc2D.PIE); Fill(arc); }