All Packages Class Hierarchy This Package Previous Next Index
Class sg.Parallelogram
java.lang.Object
|
+----sg.Quadrilateral
|
+----sg.Trapezoid
|
+----sg.Parallelogram
- public class Parallelogram
- extends Trapezoid
Creates an object representing a parallelogram.
The parallelogram 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.
For simplicity, the two sides with end points (p1,p2) and (p3,p4) of
the parallelogram are assumed to be horizontal.
-
Parallelogram(Pixel, Pixel, Pixel, Pixel)
- Four-parameter constructor.
Parallelogram
public Parallelogram(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