Package ro.sync.exml.view.graphics
Class Circle
java.lang.Object
ro.sync.exml.view.graphics.BaseShape
ro.sync.exml.view.graphics.Circle
- All Implemented Interfaces:
Shape
The class describes a circle
-
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. -
radius
public final int radiusThe overall width of this ellipse.
-
-
Constructor Details
-
Circle
public Circle(int x, int y, int radius) Constructor.- Parameters:
x
- The center x pos.y
- The center y pos.radius
- The radius of the circle.
-
-
Method Details
-
getBounds
- Returns:
- The bounds of this shape.
- 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:
-
contains
public boolean contains(int x, int y) Description copied from interface:Shape
Check if the specified coordinates are inside the shape.- Parameters:
x
- The horizontal coordinate.y
- The vertical coordinate.- Returns:
true
if the point is inside the shape.false
otherwise.- See Also:
-
toString
-