public interface IGeometry
extends java.lang.Cloneable, java.io.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 IGeometry
s are
touching each other, i.e. they have at least one Point
in common, via
the touches(IGeometry)
method.
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Point p)
|
Rectangle |
getBounds()
|
IGeometry |
getCopy()
Returns a new identical copy of this
IGeometry . |
IGeometry |
getTransformed(AffineTransform t)
Returns a new
IGeometry , which represents the given
IGeometry after the application of the given
AffineTransform . |
Path |
toPath()
|
boolean |
touches(IGeometry g)
|
boolean contains(Point p)
IGeometry getCopy()
IGeometry
.IGeometry
IGeometry getTransformed(AffineTransform t)
IGeometry
, which represents the given
IGeometry
after the application of the given
AffineTransform
. In case the AffineTransform
may be
performed type intrinsic (e.g. scaling on a Rectangle
), an object
of the same type is returned.t
- The AffineTransform
to be appliedIGeometry
object representing this
IGeometry
after the application of the given
AffineTransform
.Copyright (c) 2014 itemis AG, and others. All rights reserved.