/** * Draws an ellipse inscribed within the rectangle x1,y1,x2,y2. * * @param x1 a corner of the enclosing rectangle * @param y1 a corner of the enclosing rectangle * @param x2 a corner of the enclosing rectangle * @param y2 a corner of the enclosing rectangle */ public void ellipse(final double x1, final double y1, final double x2, final double y2) { arc(x1, y1, x2, y2, 0f, 360f); }
/** * Draws an ellipse inscribed within the rectangle x1,y1,x2,y2. * * @param x1 a corner of the enclosing rectangle * @param y1 a corner of the enclosing rectangle * @param x2 a corner of the enclosing rectangle * @param y2 a corner of the enclosing rectangle */ public void ellipse(final double x1, final double y1, final double x2, final double y2) { arc(x1, y1, x2, y2, 0f, 360f); }
/** * Draws a partial ellipse inscribed within the rectangle x1,y1,x2,y2, * starting at startAng degrees and covering extent degrees. Angles * start with 0 to the right (+x) and increase counter-clockwise. * * @param x1 a corner of the enclosing rectangle * @param y1 a corner of the enclosing rectangle * @param x2 a corner of the enclosing rectangle * @param y2 a corner of the enclosing rectangle * @param startAng starting angle in degrees * @param extent angle extent in degrees */ public void arc(final float x1, final float y1, final float x2, final float y2, final float startAng, final float extent) { arc((double)x1, (double)y1, (double)x2, (double)y2, (double)startAng, (double)extent); }
/** * Draws a partial ellipse inscribed within the rectangle x1,y1,x2,y2, * starting at startAng degrees and covering extent degrees. Angles * start with 0 to the right (+x) and increase counter-clockwise. * * @param x1 a corner of the enclosing rectangle * @param y1 a corner of the enclosing rectangle * @param x2 a corner of the enclosing rectangle * @param y2 a corner of the enclosing rectangle * @param startAng starting angle in degrees * @param extent angle extent in degrees */ public void arc(final float x1, final float y1, final float x2, final float y2, final float startAng, final float extent) { arc((double)x1, (double)y1, (double)x2, (double)y2, (double)startAng, (double)extent); }
setLineCap(1); setColorStroke(new BaseColor(0xC0, 0xC0, 0xC0)); arc(llx + 1f, lly + 1f, urx - 1f, ury - 1f, 0f, 360f); stroke(); setLineCap(1); setColorStroke(new BaseColor(0xA0, 0xA0, 0xA0)); arc(llx + 0.5f, lly + 0.5f, urx - 0.5f, ury - 0.5f, 45, 180); stroke(); setLineCap(1); setColorStroke(new BaseColor(0x00, 0x00, 0x00)); arc(llx + 1.5f, lly + 1.5f, urx - 1.5f, ury - 1.5f, 45, 180); stroke(); if (on) { setLineCap(1); setColorFill(new BaseColor(0x00, 0x00, 0x00)); arc(llx + 4f, lly + 4f, urx - 4f, ury - 4f, 0, 360); fill();
setLineCap(1); setColorStroke(new BaseColor(0xC0, 0xC0, 0xC0)); arc(llx + 1f, lly + 1f, urx - 1f, ury - 1f, 0f, 360f); stroke(); setLineCap(1); setColorStroke(new BaseColor(0xA0, 0xA0, 0xA0)); arc(llx + 0.5f, lly + 0.5f, urx - 0.5f, ury - 0.5f, 45, 180); stroke(); setLineCap(1); setColorStroke(new BaseColor(0x00, 0x00, 0x00)); arc(llx + 1.5f, lly + 1.5f, urx - 1.5f, ury - 1.5f, 45, 180); stroke(); if (on) { setLineCap(1); setColorFill(new BaseColor(0x00, 0x00, 0x00)); arc(llx + 4f, lly + 4f, urx - 4f, ury - 4f, 0, 360); fill();