public final class WCRectangle extends Object
Constructor and Description |
---|
WCRectangle() |
WCRectangle(float x,
float y,
float w,
float h) |
WCRectangle(WCRectangle r) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(WCRectangle r) |
WCRectangle |
createUnion(WCRectangle r) |
boolean |
equals(Object obj) |
float |
getHeight() |
int |
getIntHeight() |
int |
getIntWidth() |
int |
getIntX() |
int |
getIntY() |
float |
getMaxX() |
float |
getMaxY() |
float |
getMinX() |
float |
getMinY() |
float |
getWidth() |
float |
getX() |
float |
getY() |
WCRectangle |
intersection(WCRectangle r)
Determines whether or not this
WCRectangle and the specified
WCRectangle intersect. |
boolean |
isEmpty() |
void |
setFrame(float x,
float y,
float w,
float h) |
void |
setFrameFromDiagonal(float x1,
float y1,
float x2,
float y2) |
String |
toString() |
void |
translate(float dx,
float dy)
Translates this
WCRectangle the indicated distance,
to the right along the X coordinate axis, and
downward along the Y coordinate axis. |
static void |
union(WCRectangle src1,
WCRectangle src2,
WCRectangle dest) |
public WCRectangle(float x, float y, float w, float h)
public WCRectangle(WCRectangle r)
public WCRectangle()
public float getX()
public int getIntX()
public float getY()
public int getIntY()
public float getWidth()
public int getIntWidth()
public float getHeight()
public int getIntHeight()
public boolean contains(WCRectangle r)
public WCRectangle intersection(WCRectangle r)
WCRectangle
and the specified
WCRectangle
intersect. Two rectangles intersect if
their intersection is nonempty.r
- the specified WCRectangle
true
if the specified WCRectangle
and this WCRectangle
intersect;
false
otherwise.public void translate(float dx, float dy)
WCRectangle
the indicated distance,
to the right along the X coordinate axis, and
downward along the Y coordinate axis.dx
- the distance to move this WCRectangle
along the X axisdy
- the distance to move this WCRectangle
along the Y axispublic WCRectangle createUnion(WCRectangle r)
public static void union(WCRectangle src1, WCRectangle src2, WCRectangle dest)
public void setFrameFromDiagonal(float x1, float y1, float x2, float y2)
public void setFrame(float x, float y, float w, float h)
public float getMinX()
public float getMaxX()
public float getMinY()
public float getMaxY()
public boolean isEmpty()
Copyright © 2020. All rights reserved.