Package ro.sync.exml.view.graphics
Class Circle
- java.lang.Object
-
- ro.sync.exml.view.graphics.BaseShape
-
- ro.sync.exml.view.graphics.Circle
-
-
Constructor Summary
Constructors Constructor Description Circle(int x, int y, int radius)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
getBounds
public Rectangle getBounds()
- Returns:
- The bounds of this shape.
- See Also:
Shape.getBounds()
-
translate
public Shape translate(int tx, int ty)
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:
Shape.translate(int, int)
-
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:
Shape.contains(int, int)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-