| Modifier and Type | Field and Description |
|---|---|
int |
radius
The overall width of this ellipse.
|
int |
x
The x coordinate of the upper left corner of this ellipse.
|
int |
y
The y coordinate of the upper left corner of thise llipse.
|
| Constructor and Description |
|---|
Circle(int x,
int y,
int radius)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(int x,
int y)
Check if the specified coordinates are inside the shape.
|
Rectangle |
getBounds() |
java.lang.String |
toString() |
Shape |
translate(int tx,
int ty)
Translate the shape into another one.
|
public final int x
public final int y
public final int radius
public Circle(int x,
int y,
int radius)
x - The center x pos.y - The center y pos.radius - The radius of the circle.public Rectangle getBounds()
Shape.getBounds()public Shape translate(int tx, int ty)
Shapetx - the distance by which coordinates are translated in the
X axis directionty - the distance by which coordinates are translated in the
Y axis directionShape.translate(int, int)public boolean contains(int x,
int y)
Shapex - The horizontal coordinate.y - The vertical coordinate.true if the point is inside the shape. false otherwise.Shape.contains(int, int)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.