Package ro.sync.exml.view.graphics
Class Ellipse
java.lang.Object
ro.sync.exml.view.graphics.BaseShape
ro.sync.exml.view.graphics.Ellipse
- All Implemented Interfaces:
Shape
The class describes an ellipse that is defined
by a bounding rectangle.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
x
public final int xThe x coordinate of the upper left corner of this ellipse. -
y
public final int yThe y coordinate of the upper left corner of thise llipse. -
width
public final int widthThe overall width of this ellipse. -
height
public final int heightThe overall height of this ellipse.
-
-
Constructor Details
-
Ellipse
public Ellipse(int x, int y, int width, int height) Constructor.- Parameters:
x
- The bounding rectangle x pos.y
- The bounding rectangle y pos.width
- The bounding rectangle width.height
- The bounding rectangle height.
-
-
Method Details
-
getBounds
- Returns:
- The bounds of this shape.
- See Also:
-
contains
public boolean contains(int x, int y) Warning ! This was not implemented !- Parameters:
x
- The horizontal coordinate.y
- The vertical coordinate.- Returns:
true
if the point is inside the shape.false
otherwise.- See Also:
-
translate
Description copied from interface:Shape
Translate the shape into another one.- Parameters:
tx
- the distance by which coordinates are translated in the X axis directionty
- the distance by which coordinates are translated in the Y axis direction- Returns:
- The newly translated shape
- See Also:
-
toString
-