Example usage for java.awt.geom Ellipse2D getFrame

List of usage examples for java.awt.geom Ellipse2D getFrame

Introduction

In this page you can find the example usage for java.awt.geom Ellipse2D getFrame.

Prototype

@Transient
public Rectangle2D getFrame() 

Source Link

Document

Returns the framing Rectangle2D that defines the overall shape of this object.

Usage

From source file:Main.java

/**
 * Compares two ellipses and returns <code>true</code> if they are equal or
 * both <code>null</code>.//from  w  w w. j  av a2  s.  c  o m
 *
 * @param e1  the first ellipse (<code>null</code> permitted).
 * @param e2  the second ellipse (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public static boolean equal(final Ellipse2D e1, final Ellipse2D e2) {
    if (e1 == null) {
        return (e2 == null);
    }
    if (e2 == null) {
        return false;
    }
    if (!e1.getFrame().equals(e2.getFrame())) {
        return false;
    }
    return true;
}