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.Ellipseellipse -
Constructor Summary
-
Method Summary
Modifier and Type Method Description javafx.scene.shape.ShapegetFXShape()more often than not, Javafx is used for shapesdoublegetRadiusX()get the radius of the ellipse in the x directiondoublegetRadiusY()get the radius of the ellipse in the y directionvoidresize(double width, double height)resize the sprite to the following width and heightvoidsetColor(Color color)set the color of the ellipsevoidsetLayout(double x, double y)Set the component's positionvoidsetRadiusX(double radiusX)set the radius of the ellipse in the x directionvoidsetRadiusY(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:Shapemore often than not, Javafx is used for shapes- Specified by:
getFXShapein classShape- Returns:
- the javafx shape used if any
-
resize
public void resize(double width, double height)Description copied from interface:Spriteresize the sprite to the following width and height -
setLayout
public void setLayout(double x, double y)Description copied from interface:SpriteSet the component's position- Parameters:
x- positiony- position
-