Interface IGeometry

All Superinterfaces:
Cloneable, Serializable
All Known Subinterfaces:
ICurve, IMultiShape, IShape
All Known Implementing Classes:
Arc, BezierCurve, CubicCurve, CurvedPolygon, Ellipse, Line, Path, Pie, PolyBezier, Polygon, Polyline, QuadraticCurve, Rectangle, Region, Ring, RoundedRectangle

public interface IGeometry extends Cloneable, Serializable

A glance at the list of implementing classes reveals that the IGeometry interface bundles all the basic common methods for planar geometric objects. These methods enable you to test if a Point belongs to an IGeometry using the contains(Point) method. The getBounds() method returns a bounding box of the IGeometry that you call that method on. Moreover, you can bake a copy of an IGeometry using its getCopy() method. To apply an AffineTransform to an IGeometry, use the getTransformed(AffineTransform) method. Additionally, every IGeometry can be transfered into a Path by using the toPath() method. And you can check if two IGeometrys are touching each other, i.e. they have at least one Point in common, via the touches(IGeometry) method.