|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Float
public static class Rectangle2D.Float
A Rectangle2D with float coordinates.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D |
|---|
Rectangle2D.Double, Rectangle2D.Float |
| Field Summary | |
|---|---|
float |
height
The height of the rectangle; |
float |
width
The width of the rectangle |
float |
x
The x coordinate of the top left corner |
float |
y
The y coordinate of the top right corner |
| Fields inherited from class java.awt.geom.Rectangle2D |
|---|
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP |
| Constructor Summary | |
|---|---|
Rectangle2D.Float()
Create an empty rectangle at (0,0) |
|
Rectangle2D.Float(float x,
float y,
float width,
float height)
Create a rectangle with float coordinates |
|
| Method Summary | |
|---|---|
Rectangle2D |
getBounds2D()
Get the bounds as a Rectangle2D with float coordinates |
double |
getHeight()
Get the height as a double |
double |
getWidth()
Get the width as a double |
double |
getX()
Get the x coordinate as a double |
double |
getY()
Get the y coordinate as a double |
boolean |
isEmpty()
Test if the rectangular shape is empty |
int |
outcode(double x,
double y)
Returns a mask value that specifies where a point lies with respect to this rectangle. |
void |
setRect(double x,
double y,
double w,
double h)
Set this rectangle to a rectangle defined by double coordinates |
void |
setRect(float x,
float y,
float w,
float h)
Set the rectangle using float coordinates |
void |
setRect(Rectangle2D r)
Set this Rectangle2D to be the same as a given Rectangle2D |
| Methods inherited from class java.awt.geom.Rectangle2D |
|---|
contains, contains, equals, intersects, intersectsLine, outcode, setFrame |
| Methods inherited from class java.awt.geom.RectangularShape |
|---|
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public float x
public float y
public float width
public float height
| Constructor Detail |
|---|
public Rectangle2D.Float()
public Rectangle2D.Float(float x,
float y,
float width,
float height)
x - the x coordinate of the top left cornery - the y coordinate of the top left cornerwidth - the width of the rectangleheight - the height of the rectangle| Method Detail |
|---|
public double getX()
RectangularShape
getX in class RectangularShapepublic double getY()
RectangularShape
getY in class RectangularShapepublic double getWidth()
RectangularShape
getWidth in class RectangularShapepublic double getHeight()
RectangularShape
getHeight in class RectangularShapepublic boolean isEmpty()
RectangularShape
isEmpty in class RectangularShapepublic Rectangle2D getBounds2D()
public void setRect(float x,
float y,
float w,
float h)
x - the x coordinate of the top left cornery - the y coordinate of the top left cornerw - the widthh - the heightpublic void setRect(Rectangle2D r)
Rectangle2D
setRect in class Rectangle2Dr - the Rectangle2D
public void setRect(double x,
double y,
double w,
double h)
Rectangle2D
setRect in class Rectangle2Dx - the x coordinate of the top left cornery - the y coordinate of the top right cornerw - the width of the rectangleh - the height of the rectangle
public int outcode(double x,
double y)
Rectangle2D
outcode in class Rectangle2Dx - the x coordinate of the given pointy - the y coordinate of the given point
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||