Module org.htmlunit

Interface Shape2D

All Known Implementing Classes:
Circle2D, Line2D, Polygon2D, Rectangle2D

public interface Shape2D
Simple 2D shape interface.
Author:
Ronald Brill
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
    Constant used for comparing doubles.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(double x, double y)
    Returns whether the specified point lies inside this shape.
    boolean
    Returns whether this shape is empty.
  • Field Details

    • EPSILON

      static final double EPSILON
      Constant used for comparing doubles.
      See Also:
  • Method Details

    • contains

      boolean contains(double x, double y)
      Returns whether the specified point lies inside this shape.
      Parameters:
      x - the x coordinate of the point to test
      y - the y coordinate of the point to test
      Returns:
      true if the point is inside this shape; false otherwise
    • isEmpty

      boolean isEmpty()
      Returns whether this shape is empty.
      Returns:
      true if this shape is empty; false otherwise