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
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 IGeometry
s are
touching each other, i.e. they have at least one Point
in common, via
the touches(IGeometry)
method.
-
Method Details
-
contains
-
getBounds
Rectangle getBounds() -
getCopy
IGeometry getCopy()Returns a new identical copy of thisIGeometry
.- Returns:
- a copy identical to this
IGeometry
-
getTransformed
Returns a newIGeometry
, which represents the givenIGeometry
after the application of the givenAffineTransform
. In case theAffineTransform
may be performed type intrinsic (e.g. scaling on aRectangle
), an object of the same type is returned.- Parameters:
t
- TheAffineTransform
to be applied- Returns:
- A new
IGeometry
object representing thisIGeometry
after the application of the givenAffineTransform
.
-
toPath
Path toPath() -
touches
-