Java java.awt.geom Rectangle2D fields, constructors, methods, implement or subclass

Example usage for Java java.awt.geom Rectangle2D fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt.geom Rectangle2D.

The text is from its open source code.

Field

intOUT_LEFT
The bitmask that indicates that a point lies to the left of this Rectangle2D .
intOUT_TOP
The bitmask that indicates that a point lies above this Rectangle2D .
intOUT_RIGHT
The bitmask that indicates that a point lies to the right of this Rectangle2D .
intOUT_BOTTOM
The bitmask that indicates that a point lies below this Rectangle2D .

Method

voidadd(Point2D pt)
Adds the Point2D object pt to this Rectangle2D .
voidadd(Rectangle2D r)
Adds a Rectangle2D object to this Rectangle2D .
Objectclone()
Creates a new object of the same class and with the same contents as this object.
booleancontains(Point2D p)
booleancontains(double x, double y)
booleancontains(double x, double y, double w, double h)
Rectangle2DcreateIntersection(Rectangle2D r)
Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D .
RectanglegetBounds()
Rectangle2DgetBounds2D()
doublegetCenterX()
Returns the X coordinate of the center of the framing rectangle of the Shape in double precision.
doublegetCenterY()
Returns the Y coordinate of the center of the framing rectangle of the Shape in double precision.
doublegetHeight()
Returns the height of the framing rectangle in double precision.
doublegetMaxX()
Returns the largest X coordinate of the framing rectangle of the Shape in double precision.
doublegetMaxY()
Returns the largest Y coordinate of the framing rectangle of the Shape in double precision.
doublegetMinX()
Returns the smallest X coordinate of the framing rectangle of the Shape in double precision.
doublegetMinY()
Returns the smallest Y coordinate of the framing rectangle of the Shape in double precision.
doublegetWidth()
Returns the width of the framing rectangle in double precision.
doublegetX()
Returns the X coordinate of the upper-left corner of the framing rectangle in double precision.
doublegetY()
Returns the Y coordinate of the upper-left corner of the framing rectangle in double precision.
voidintersect(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest)
Intersects the pair of specified source Rectangle2D objects and puts the result into the specified destination Rectangle2D object.
booleanintersects(Rectangle2D r)
booleanintersects(double x, double y, double w, double h)
booleanintersectsLine(double x1, double y1, double x2, double y2)
Tests if the specified line segment intersects the interior of this Rectangle2D .
booleanisEmpty()
Determines whether the RectangularShape is empty.
intoutcode(double x, double y)
Determines where the specified coordinates lie with respect to this Rectangle2D .
voidsetFrame(Point2D loc, Dimension2D size)
Sets the location and size of the framing rectangle of this Shape to the specified Point2D and Dimension2D , respectively.
voidsetFrame(double x, double y, double w, double h)
Sets the location and size of the outer bounds of this Rectangle2D to the specified rectangular values.
voidsetFrameFromDiagonal(double x1, double y1, double x2, double y2)
Sets the diagonal of the framing rectangle of this Shape based on the two specified coordinates.
voidsetFrameFromDiagonal(Point2D p1, Point2D p2)
Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects.
voidsetRect(double x, double y, double w, double h)
Sets the location and size of this Rectangle2D to the specified double values.
voidsetRect(Rectangle2D r)
Sets this Rectangle2D to be the same as the specified Rectangle2D .
voidunion(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest)
Unions the pair of source Rectangle2D objects and puts the result into the specified destination Rectangle2D object.