public interface XyArea<T extends XyArea> extends XyShape<T>
Examples of areas are circles, squares, polygons, etc.
Copyright 2007 Partner Software, Inc.
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(XyPoint point)
Tests if a point is inside this area.
|
double |
getArea()
Returns the 2-dimensional area covered by this...
|
double |
getPerimeter()
Returns the total length of the lines and/or curves bounding the area.
|
XyPolygon |
toPolygon()
Same as
toPolygon(XyAngle) with a default angle granularity of
1/60 circle (1 degree, pi/30 radians). |
XyPolygon |
toPolygon(XyAngle granularity)
Converts this area to a polygon which approximates it in some fashion.
|
getBounds, scaledBy, transformedBy, translatedByboolean contains(XyPoint point)
point - point to test for containmentdouble getArea()
double getPerimeter()
XyPolygon toPolygon(XyAngle granularity)
The angle parameter allows a certain level of control of the output. Essentially it dictates the minimum angular granularity used to approximate curved paths. For example, a circle would be turned into a polygon by placing points around the circle, separated by the given angle.
XyPolygon toPolygon()
toPolygon(XyAngle) with a default angle granularity of
1/60 circle (1 degree, pi/30 radians).