Rectangle2D (Java Platform SE 8 ) (original) (raw)
Modifier and Type
Method
Description
void
[add](../../../java/awt/geom/Rectangle2D.html#add-double-double-)(double newx, double newy)
Adds a point, specified by the double precision argumentsnewx
and newy
, to thisRectangle2D
.
void
[add](../../../java/awt/geom/Rectangle2D.html#add-java.awt.geom.Point2D-)([Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom") pt)
Adds the Point2D
object pt
to thisRectangle2D
.
void
[add](../../../java/awt/geom/Rectangle2D.html#add-java.awt.geom.Rectangle2D-)([Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") r)
Adds a Rectangle2D
object to thisRectangle2D
.
boolean
[contains](../../../java/awt/geom/Rectangle2D.html#contains-double-double-)(double x, double y)
Tests if the specified coordinates are inside the boundary of theShape
, as described by the definition of insideness.
boolean
[contains](../../../java/awt/geom/Rectangle2D.html#contains-double-double-double-double-)(double x, double y, double w, double h)
Tests if the interior of the Shape
entirely contains the specified rectangular area.
abstract [Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom")
[createIntersection](../../../java/awt/geom/Rectangle2D.html#createIntersection-java.awt.geom.Rectangle2D-)([Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") r)
Returns a new Rectangle2D
object representing the intersection of this Rectangle2D
with the specifiedRectangle2D
.
abstract [Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom")
[createUnion](../../../java/awt/geom/Rectangle2D.html#createUnion-java.awt.geom.Rectangle2D-)([Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") r)
Returns a new Rectangle2D
object representing the union of this Rectangle2D
with the specifiedRectangle2D
.
boolean
[equals](../../../java/awt/geom/Rectangle2D.html#equals-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") obj)
Determines whether or not the specified Object
is equal to this Rectangle2D
.
[Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom")
[getBounds2D](../../../java/awt/geom/Rectangle2D.html#getBounds2D--)()
Returns a high precision and more accurate bounding box of the Shape
than the getBounds
method.
[PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom")
[getPathIterator](../../../java/awt/geom/Rectangle2D.html#getPathIterator-java.awt.geom.AffineTransform-)([AffineTransform](../../../java/awt/geom/AffineTransform.html "class in java.awt.geom") at)
Returns an iteration object that defines the boundary of thisRectangle2D
.
[PathIterator](../../../java/awt/geom/PathIterator.html "interface in java.awt.geom")
[getPathIterator](../../../java/awt/geom/Rectangle2D.html#getPathIterator-java.awt.geom.AffineTransform-double-)([AffineTransform](../../../java/awt/geom/AffineTransform.html "class in java.awt.geom") at, double flatness)
Returns an iteration object that defines the boundary of the flattened Rectangle2D
.
int
[hashCode](../../../java/awt/geom/Rectangle2D.html#hashCode--)()
Returns the hashcode for this Rectangle2D
.
static void
[intersect](../../../java/awt/geom/Rectangle2D.html#intersect-java.awt.geom.Rectangle2D-java.awt.geom.Rectangle2D-java.awt.geom.Rectangle2D-)([Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") src1,[Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") src2,[Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") dest)
Intersects the pair of specified source Rectangle2D
objects and puts the result into the specified destinationRectangle2D
object.
boolean
[intersects](../../../java/awt/geom/Rectangle2D.html#intersects-double-double-double-double-)(double x, double y, double w, double h)
Tests if the interior of the Shape
intersects the interior of a specified rectangular area.
boolean
[intersectsLine](../../../java/awt/geom/Rectangle2D.html#intersectsLine-double-double-double-double-)(double x1, double y1, double x2, double y2)
Tests if the specified line segment intersects the interior of thisRectangle2D
.
boolean
[intersectsLine](../../../java/awt/geom/Rectangle2D.html#intersectsLine-java.awt.geom.Line2D-)([Line2D](../../../java/awt/geom/Line2D.html "class in java.awt.geom") l)
Tests if the specified line segment intersects the interior of thisRectangle2D
.
abstract int
[outcode](../../../java/awt/geom/Rectangle2D.html#outcode-double-double-)(double x, double y)
Determines where the specified coordinates lie with respect to this Rectangle2D
.
int
[outcode](../../../java/awt/geom/Rectangle2D.html#outcode-java.awt.geom.Point2D-)([Point2D](../../../java/awt/geom/Point2D.html "class in java.awt.geom") p)
Determines where the specified Point2D lies with respect to this Rectangle2D
.
void
[setFrame](../../../java/awt/geom/Rectangle2D.html#setFrame-double-double-double-double-)(double x, double y, double w, double h)
Sets the location and size of the outer bounds of thisRectangle2D
to the specified rectangular values.
abstract void
[setRect](../../../java/awt/geom/Rectangle2D.html#setRect-double-double-double-double-)(double x, double y, double w, double h)
Sets the location and size of this Rectangle2D
to the specified double
values.
void
[setRect](../../../java/awt/geom/Rectangle2D.html#setRect-java.awt.geom.Rectangle2D-)([Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") r)
Sets this Rectangle2D
to be the same as the specifiedRectangle2D
.
static void
[union](../../../java/awt/geom/Rectangle2D.html#union-java.awt.geom.Rectangle2D-java.awt.geom.Rectangle2D-java.awt.geom.Rectangle2D-)([Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") src1,[Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") src2,[Rectangle2D](../../../java/awt/geom/Rectangle2D.html "class in java.awt.geom") dest)
Unions the pair of source Rectangle2D
objects and puts the result into the specified destinationRectangle2D
object.