java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.PolyShape
All Implemented Interfaces:
IPolyShape

public class PolyShape extends Object implements IPolyShape
  • Constructor Details

    • PolyShape

      public PolyShape()
      Instantiates a new PolyShape instance.
    • PolyShape

      public PolyShape(IPolyShape original)
      Instantiates a new PolyShape instance by copying from the specified original.
      Parameters:
      original - The poly line to be copied.
  • Method Details

    • getPoints

      public List<Point2D> getPoints()
      Description copied from interface: IPolyShape
      Gets all points of a polyline. The points are relative to the x and y coordinate of the parent IMapObject.

      To get a Path2D object, you should use Map

      Specified by:
      getPoints in interface IPolyShape
      Returns:
      A list containing all points of the polyline.
    • getAbsolutePoints

      public List<Point2D> getAbsolutePoints(double x, double y)
      Specified by:
      getAbsolutePoints in interface IPolyShape
    • getAbsolutePoints

      public List<Point2D> getAbsolutePoints(Point2D origin)
      Specified by:
      getAbsolutePoints in interface IPolyShape
    • equals

      public boolean equals(Object anObject)
      Description copied from interface: IPolyShape
      Tests for equality between two polylines. Two polylines are equal if they have the same points.
      Specified by:
      equals in interface IPolyShape
      Overrides:
      equals in class Object
      Parameters:
      anObject - The polyline to test equality for
      Returns:
      Whether the two polylines are equal, or false if anObject is not a polyline
    • hashCode

      public int hashCode()
      Description copied from interface: IPolyShape
      Computes a hash code for this polyline. A polyline's hash code is equal to the hash code of its points.
      Specified by:
      hashCode in interface IPolyShape
      Overrides:
      hashCode in class Object
      Returns:
      The hash code for this polyline