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

    Constructors
    Constructor Description
    Ellipse​(double radiusX, double radiusY, Color color)
    Instantiate Ellipse Sprite
    Ellipse​(Color color)
    Instantiate Ellipse Sprite
  • Method Summary

    Modifier and Type Method Description
    javafx.scene.shape.Shape getFXShape()
    more often than not, Javafx is used for shapes
    double getRadiusX()
    get the radius of the ellipse in the x direction
    double getRadiusY()
    get the radius of the ellipse in the y direction
    void resize​(double width, double height)
    resize the sprite to the following width and height
    void setColor​(Color color)
    set the color of the ellipse
    void setLayout​(double x, double y)
    Set the component's position
    void setRadiusX​(double radiusX)
    set the radius of the ellipse in the x direction
    void setRadiusY​(double radiusY)
    set the radius of the ellipse in the y direction

    Methods inherited from class fr.r1r0r0.deltaengine.model.sprites.shapes.Shape

    getNode

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface fr.r1r0r0.deltaengine.model.sprites.Sprite

    getLayout, getRotate, getScale, getSize, getZOrder, setLayout, setRotate, setScale, setZOrder
  • Field Details

    • ellipse

      private final javafx.scene.shape.Ellipse ellipse
  • Constructor Details

    • Ellipse

      public Ellipse​(double radiusX, double radiusY, Color color)
      Instantiate Ellipse Sprite
      Parameters:
      radiusX - radius in the X direction
      radiusY - radius in the Y direction
      color - of the ellipse
    • Ellipse

      public Ellipse​(Color color)
      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

      public void setColor​(Color color)
      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 class Shape
      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 - position
      y - position