Class BaseShape

  • All Implemented Interfaces:
    Shape
    Direct Known Subclasses:
    Circle, Ellipse, Polygon

    @API(type=EXTENDABLE,
         src=PRIVATE)
    public abstract class BaseShape
    extends java.lang.Object
    implements Shape
    Base for shapes.
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseShape()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(int x, int y, int w, int h)
      Check if the specified coordinates are inside the shape.
      • Methods inherited from class java.lang.Object

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

      • BaseShape

        public BaseShape()
    • Method Detail

      • contains

        public boolean contains​(int x,
                                int y,
                                int w,
                                int h)
        Description copied from interface: Shape
        Check if the specified coordinates are inside the shape.
        Specified by:
        contains in interface Shape
        Parameters:
        x - The horizontal coordinate.
        y - The vertical coordinate.
        w - The width.
        h - The height.
        Returns:
        true if the point is inside the shape. false otherwise.
        See Also:
        Shape.contains(int, int, int, int)