Modifier and Type | Field and Description |
---|---|
int |
height
The overall height of this ellipse.
|
int |
width
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 |
---|
Ellipse(int x,
int y,
int width,
int height)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(int x,
int y)
Warning ! This was not implemented !
|
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 width
public final int height
public Ellipse(int x, int y, int width, int height)
x
- The bounding rectangle x pos.y
- The bounding rectangle y pos.width
- The bounding rectangle width.height
- The bounding rectangle height.public Rectangle getBounds()
Shape.getBounds()
public boolean contains(int x, int y)
x
- The horizontal coordinate.y
- The vertical coordinate.true
if the point is inside the shape. false
otherwise.Shape.contains(int, int)
public Shape translate(int tx, int ty)
Shape
tx
- 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 java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.