Example usage for java.awt.geom Ellipse2D setFrameFromDiagonal

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

Introduction

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

Prototype

public void setFrameFromDiagonal(Point2D p1, Point2D p2) 

Source Link

Document

Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects.

Usage

From source file:ShapeTest.java

public Shape makeShape(Point2D[] p) {
    Ellipse2D s = new Ellipse2D.Double();
    s.setFrameFromDiagonal(p[0], p[1]);
    return s;//  w w  w  .  j a  v a2  s .  c o m
}