Class EllipseArea

  • All Implemented Interfaces:
    java.awt.Shape, java.lang.Cloneable, PlaneArea, Copiable

    public class EllipseArea
    extends Handle
    implements PlaneArea
    Represents an ellipse in the Euclidean space R2.
    Since:
    OME2.2
    • Constructor Summary

      Constructors 
      Constructor Description
      EllipseArea​(float x, float y, float width, float height)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(double x, double y)
      Required by the Shape I/F.
      boolean contains​(double x, double y, double w, double h)
      Required by the Shape I/F.
      boolean contains​(java.awt.geom.Point2D p)
      Required by the Shape I/F.
      boolean contains​(java.awt.geom.Rectangle2D r)
      Required by the Shape I/F.
      java.awt.Rectangle getBounds()
      Required by the Shape I/F.
      java.awt.geom.Rectangle2D getBounds2D()
      Required by the Shape I/F.
      java.awt.geom.PathIterator getPathIterator​(java.awt.geom.AffineTransform at)
      Required by the Shape I/F.
      java.awt.geom.PathIterator getPathIterator​(java.awt.geom.AffineTransform at, double flatness)
      Required by the Shape I/F.
      PlanePoint[] getPoints()
      Implemented as specified by the PlaneArea I/F.
      boolean intersects​(double x, double y, double w, double h)
      Required by the Shape I/F.
      boolean intersects​(java.awt.geom.Rectangle2D r)
      Required by the Shape I/F.
      boolean onBoundaries​(double x, double y)
      Implemented as specified by the PlaneArea I/F.
      void scale​(double factor)
      Implemented as specified by the PlaneArea I/F.
      void setBounds​(int x, int y, int width, int height)
      Implemented as specified in the PlaneArea I/F.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EllipseArea

        public EllipseArea​(float x,
                           float y,
                           float width,
                           float height)
        Creates a new instance.
        Parameters:
        x - The x-coordinate of the top-left corner.
        y - The y-coordinate of the top-left corner.
        width - The width of the ellipse.
        height - The height of the ellipse.
    • Method Detail

      • setBounds

        public void setBounds​(int x,
                              int y,
                              int width,
                              int height)
        Implemented as specified in the PlaneArea I/F.
        Specified by:
        setBounds in interface PlaneArea
        Parameters:
        x - The x-coordinate of the top-left corner.
        y - The y-coordinate of the top-left corner.
        width - The width of the area.
        height - The height of the area.
        See Also:
        PlaneArea.setBounds(int, int, int, int)
      • onBoundaries

        public boolean onBoundaries​(double x,
                                    double y)
        Implemented as specified by the PlaneArea I/F.
        Specified by:
        onBoundaries in interface PlaneArea
        Parameters:
        x - The x-coordinate of the point.
        y - The y-coordinate of the point.
        Returns:
        true if the point is on the boundary, false otherwise.
        See Also:
        PlaneArea.onBoundaries(double, double)
      • contains

        public boolean contains​(double x,
                                double y)
        Required by the Shape I/F.
        Specified by:
        contains in interface java.awt.Shape
        See Also:
        Shape.contains(double, double)
      • contains

        public boolean contains​(double x,
                                double y,
                                double w,
                                double h)
        Required by the Shape I/F.
        Specified by:
        contains in interface java.awt.Shape
        See Also:
        Shape.contains(double, double, double, double)
      • intersects

        public boolean intersects​(double x,
                                  double y,
                                  double w,
                                  double h)
        Required by the Shape I/F.
        Specified by:
        intersects in interface java.awt.Shape
        See Also:
        Shape.intersects(double, double, double, double)
      • getBounds

        public java.awt.Rectangle getBounds()
        Required by the Shape I/F.
        Specified by:
        getBounds in interface java.awt.Shape
        See Also:
        Shape.getBounds()
      • contains

        public boolean contains​(java.awt.geom.Point2D p)
        Required by the Shape I/F.
        Specified by:
        contains in interface java.awt.Shape
        See Also:
        Shape.contains(Point2D)
      • getBounds2D

        public java.awt.geom.Rectangle2D getBounds2D()
        Required by the Shape I/F.
        Specified by:
        getBounds2D in interface java.awt.Shape
        See Also:
        Shape.getBounds2D()
      • contains

        public boolean contains​(java.awt.geom.Rectangle2D r)
        Required by the Shape I/F.
        Specified by:
        contains in interface java.awt.Shape
        See Also:
        Shape.contains(Rectangle2D)
      • intersects

        public boolean intersects​(java.awt.geom.Rectangle2D r)
        Required by the Shape I/F.
        Specified by:
        intersects in interface java.awt.Shape
        See Also:
        Shape.intersects(Rectangle2D)
      • getPathIterator

        public java.awt.geom.PathIterator getPathIterator​(java.awt.geom.AffineTransform at)
        Required by the Shape I/F.
        Specified by:
        getPathIterator in interface java.awt.Shape
        See Also:
        Shape.getPathIterator(AffineTransform)
      • getPathIterator

        public java.awt.geom.PathIterator getPathIterator​(java.awt.geom.AffineTransform at,
                                                          double flatness)
        Required by the Shape I/F.
        Specified by:
        getPathIterator in interface java.awt.Shape
        See Also:
        Shape.getPathIterator(AffineTransform, double)