类 EllipseShape

  • 所有已实现的接口:
    Cloneable
    直接已知子类:
    ArcShape

    public class EllipseShape
    extends PolygonShape
    Ellipse shape class
    作者:
    Yaqiang Wang
    • 字段详细资料

      • angle

        protected float angle
    • 构造器详细资料

      • EllipseShape

        public EllipseShape()
        Constructor
      • EllipseShape

        public EllipseShape​(double x,
                            double y,
                            double width,
                            double height)
        Constructor
        参数:
        x - Center x
        y - Center y
        width - Width
        height - Height
    • 方法详细资料

      • getCenter

        public PointD getCenter()
        Get center point
        返回:
        Center point
      • getWidth

        public double getWidth()
        Get width
        返回:
        Width
      • getHeight

        public double getHeight()
        Get height
        返回:
        Height
      • getAngle

        public float getAngle()
        Get angle
        返回:
        Angle
      • setAngle

        public void setAngle​(float value)
        Set angle
        参数:
        value - Angle
      • getA

        public double getA()
        Get semi-major axis a
        返回:
        Semi-major axis a
      • getB

        public double getB()
        Get semi-minor axis b
        返回:
        Semi-minor axis b
      • contains

        public boolean contains​(PointD p)
        If this shape contains a point
        参数:
        p - Point
        返回:
        Contains a point or not