PennDraw.java
/**
     * Draw an ellipse with given semimajor and semiminor axes, centered on (x, y).
     * @param x the x-coordinate of the center of the ellipse
     * @param y the y-coordinate of the center of the ellipse
     * @param semiMajorAxis is the semimajor axis of the ellipse
     * @param semiMinorAxis is the semiminor axis of the ellipse
     * @param degrees counter-clockwise rotation by angle degrees around the center
     * @throws IllegalArgumentException if either of the axes are negative
     */
Draw an ellipse with given semimajor and semiminor axes, centered on (x, y).
Draw an ellipse with given semimajor and semiminor axes centered on ( x y ) .
public static void ellipse(double x, double y, double semiMajorAxis, double semiMinorAxis, double degrees) {
        AffineTransform t = (AffineTransform) offscreen.getTransform();
        offscreen.rotate(Math.toRadians(-degrees), scaleX(x), scaleY(y));
        ellipse(x, y, semiMajorAxis, semiMinorAxis);
        offscreen.setTransform(t);
    }
public static void ellipse ( double x , double y , double semiMajorAxis , double semiMinorAxis , double degrees ) { AffineTransform t = ( AffineTransform ) offscreen . getTransform ( ) ; offscreen . rotate ( Math . toRadians ( - degrees ) , scaleX ( x ) , scaleY ( y ) ) ; ellipse ( x , y , semiMajorAxis , semiMinorAxis ) ; offscreen . setTransform ( t ) ; }
Draw an ellipse with given semimajor and semiminor axes, centered on (x, y).
Draw an ellipse with given semimajor and semiminor axes centered on ( x y ) .