Class Ellipse
java.lang.Object
fr.r1r0r0.deltaengine.model.sprites.shapes.Shape
fr.r1r0r0.deltaengine.model.sprites.shapes.Ellipse
- All Implemented Interfaces:
Sprite
public class Ellipse extends Shape
Ellipse Sprite
-
Field Summary
Fields Modifier and Type Field Description private javafx.scene.shape.Ellipse
ellipse
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description javafx.scene.shape.Shape
getFXShape()
more often than not, Javafx is used for shapesdouble
getRadiusX()
get the radius of the ellipse in the x directiondouble
getRadiusY()
get the radius of the ellipse in the y directionvoid
resize(double width, double height)
resize the sprite to the following width and heightvoid
setColor(Color color)
set the color of the ellipsevoid
setLayout(double x, double y)
Set the component's positionvoid
setRadiusX(double radiusX)
set the radius of the ellipse in the x directionvoid
setRadiusY(double radiusY)
set the radius of the ellipse in the y directionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
ellipse
private final javafx.scene.shape.Ellipse ellipse
-
-
Constructor Details
-
Ellipse
Instantiate Ellipse Sprite- Parameters:
radiusX
- radius in the X directionradiusY
- radius in the Y directioncolor
- of the ellipse
-
Ellipse
Instantiate Ellipse Sprite- Parameters:
color
- of the ellipse
-
-
Method Details
-
getRadiusX
public double getRadiusX()get the radius of the ellipse in the x direction- Returns:
- the radius of the ellipse in the x direction
-
getRadiusY
public double getRadiusY()get the radius of the ellipse in the y direction- Returns:
- the radius of the ellipse in the y direction
-
setRadiusX
public void setRadiusX(double radiusX)set the radius of the ellipse in the x direction- Parameters:
radiusX
- the new radius of the ellipse in the x direction
-
setRadiusY
public void setRadiusY(double radiusY)set the radius of the ellipse in the y direction- Parameters:
radiusY
- the new radius of the ellipse in the y direction
-
setColor
set the color of the ellipse- Parameters:
color
- the new color of the ellipse
-
getFXShape
public javafx.scene.shape.Shape getFXShape()Description copied from class:Shape
more often than not, Javafx is used for shapes- Specified by:
getFXShape
in classShape
- Returns:
- the javafx shape used if any
-
resize
public void resize(double width, double height)Description copied from interface:Sprite
resize the sprite to the following width and height -
setLayout
public void setLayout(double x, double y)Description copied from interface:Sprite
Set the component's position- Parameters:
x
- positiony
- position
-