All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sg.Trapezoid

java.lang.Object
   |
   +----sg.Quadrilateral
           |
           +----sg.Trapezoid

public class Trapezoid
extends Quadrilateral
The class Trapezoid defines a trapezoid object. For simplicity, the two parallel sides of the trapezoid are assumed to be horizontal. The trapezoid is determined by four points (p1, p2, p3, p4). p1 is assumed to be the upper left hand corner and the other points are assumed to be listed in clockwise order.


Constructor Index

 o Trapezoid(Pixel, Pixel, Pixel, Pixel)
Four-parameter constructor.

Constructors

 o Trapezoid
 public Trapezoid(Pixel pt1,
                  Pixel pt2,
                  Pixel pt3,
                  Pixel pt4)
Four-parameter constructor. Throws IllegalArgumentException if four parameters do not define a Trapezoid with the top and bottom horizontal.


All Packages  Class Hierarchy  This Package  Previous  Next  Index