public class RoundRectangle extends RectangularShape
Defines a rectangle with rounded corners, where the sizes of the corners are potentially different.
| Modifier and Type | Field and Description |
|---|---|
double |
height |
double |
llHeight |
double |
llWidth |
double |
lrHeight |
double |
lrWidth |
double |
ulHeight |
double |
ulWidth |
double |
urHeight |
double |
urWidth |
double |
width |
double |
x |
double |
y |
| Constructor and Description |
|---|
RoundRectangle(float x,
float y,
float width,
float height,
float[] cornerDimensions) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(double x,
double y) |
boolean |
contains(double x,
double y,
double w,
double h) |
Rectangle2D |
getBounds2D() |
double |
getHeight() |
PathIterator |
getPathIterator(AffineTransform at) |
double |
getWidth() |
double |
getX() |
double |
getY() |
boolean |
intersects(double x,
double y,
double w,
double h) |
boolean |
isEmpty() |
void |
setFrame(double x,
double y,
double w,
double h) |
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonalpublic double x
public double y
public double width
public double height
public double ulWidth
public double ulHeight
public double urWidth
public double urHeight
public double lrWidth
public double lrHeight
public double llWidth
public double llHeight
public RoundRectangle(float x,
float y,
float width,
float height,
float[] cornerDimensions)
cornerDimensions - array of 8 floating-point number corresponding to the width and the height of each corner in the following order: upper-left, upper-right, lower-right, lower-left. It assumes for the size the same convention as RoundRectangle2D, that is that the width and height of a corner correspond to the total width and height of the ellipse that corner is a quarter of.public double getX()
getX in class RectangularShapepublic double getY()
getY in class RectangularShapepublic double getWidth()
getWidth in class RectangularShapepublic double getHeight()
getHeight in class RectangularShapepublic boolean isEmpty()
isEmpty in class RectangularShapepublic void setFrame(double x,
double y,
double w,
double h)
setFrame in class RectangularShapepublic Rectangle2D getBounds2D()
public boolean contains(double x,
double y)
public boolean intersects(double x,
double y,
double w,
double h)
public boolean contains(double x,
double y,
double w,
double h)
public PathIterator getPathIterator(AffineTransform at)