Class PolyShape
java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.PolyShape
- All Implemented Interfaces:
IPolyShape
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a newPolyShapeinstance.PolyShape(IPolyShape original) Instantiates a newPolyShapeinstance by copying from the specified original. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests for equality between two polylines.getAbsolutePoints(double x, double y) getAbsolutePoints(Point2D origin) Gets all points of a polyline.inthashCode()Computes a hash code for this polyline.
-
Constructor Details
-
PolyShape
public PolyShape()Instantiates a newPolyShapeinstance. -
PolyShape
Instantiates a newPolyShapeinstance by copying from the specified original.- Parameters:
original- The poly line to be copied.
-
-
Method Details
-
getPoints
Description copied from interface:IPolyShapeGets all points of a polyline. The points are relative to the x and y coordinate of the parentIMapObject.To get a
Path2Dobject, you should useMap- Specified by:
getPointsin interfaceIPolyShape- Returns:
- A list containing all points of the polyline.
-
getAbsolutePoints
- Specified by:
getAbsolutePointsin interfaceIPolyShape
-
getAbsolutePoints
- Specified by:
getAbsolutePointsin interfaceIPolyShape
-
equals
Description copied from interface:IPolyShapeTests for equality between two polylines. Two polylines are equal if they have the same points.- Specified by:
equalsin interfaceIPolyShape- Overrides:
equalsin classObject- Parameters:
anObject- The polyline to test equality for- Returns:
- Whether the two polylines are equal, or
falseifanObjectis not a polyline
-
hashCode
public int hashCode()Description copied from interface:IPolyShapeComputes a hash code for this polyline. A polyline's hash code is equal to the hash code of its points.- Specified by:
hashCodein interfaceIPolyShape- Overrides:
hashCodein classObject- Returns:
- The hash code for this polyline
-