Example usage for java.awt.geom Arc2D getFrame

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

Introduction

In this page you can find the example usage for java.awt.geom Arc2D 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 arcs and returns <code>true</code> if they are equal or
 * both <code>null</code>./*from ww  w  .j  a v  a  2 s . c o m*/
 *
 * @param a1  the first arc (<code>null</code> permitted).
 * @param a2  the second arc (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public static boolean equal(final Arc2D a1, final Arc2D a2) {
    if (a1 == null) {
        return (a2 == null);
    }
    if (a2 == null) {
        return false;
    }
    if (!a1.getFrame().equals(a2.getFrame())) {
        return false;
    }
    if (a1.getAngleStart() != a2.getAngleStart()) {
        return false;
    }
    if (a1.getAngleExtent() != a2.getAngleExtent()) {
        return false;
    }
    if (a1.getArcType() != a2.getArcType()) {
        return false;
    }
    return true;
}