java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
de.gurkenlabs.litiengine.environment.tilemap.xml.MapImage
All Implemented Interfaces:
ICustomPropertyProvider, IMapImage

public class MapImage
extends CustomPropertyProvider
implements IMapImage
  • Constructor Details

    • MapImage

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

      public MapImage​(MapImage original)
      Instantiates a new MapImage instance by copying the specified original.
      Parameters:
      original - the original we want to copy
  • Method Details

    • getAbsoluteSourcePath

      public java.net.URL getAbsoluteSourcePath()
      Specified by:
      getAbsoluteSourcePath in interface IMapImage
    • getDimension

      public java.awt.Dimension getDimension()
      Description copied from interface: IMapImage
      Gets the dimension.
      Specified by:
      getDimension in interface IMapImage
      Returns:
      the dimension
    • getWidth

      public int getWidth()
      Description copied from interface: IMapImage
      Gets the width.
      Specified by:
      getWidth in interface IMapImage
      Returns:
      the width
    • getHeight

      public int getHeight()
      Description copied from interface: IMapImage
      Gets the height.
      Specified by:
      getHeight in interface IMapImage
      Returns:
      the height
    • getSource

      public java.lang.String getSource()
      Description copied from interface: IMapImage
      Gets the source.
      Specified by:
      getSource in interface IMapImage
      Returns:
      the source
    • getTransparentColor

      public java.awt.Color getTransparentColor()
      Description copied from interface: IMapImage
      Gets the transparent color.
      Specified by:
      getTransparentColor in interface IMapImage
      Returns:
      the transparent color
    • setTransparentColor

      public void setTransparentColor​(java.awt.Color color)
      Specified by:
      setTransparentColor in interface IMapImage
    • setSource

      public void setSource​(java.lang.String source)
      Specified by:
      setSource in interface IMapImage
    • setAbsoluteSourcePath

      public void setAbsoluteSourcePath​(java.net.URL absolutePath)
      Specified by:
      setAbsoluteSourcePath in interface IMapImage
    • setWidth

      public void setWidth​(int width)
      Specified by:
      setWidth in interface IMapImage
    • setHeight

      public void setHeight​(int height)
      Specified by:
      setHeight in interface IMapImage
    • equals

      public boolean equals​(java.lang.Object anObject)
      Description copied from interface: IMapImage
      Tests for equality between two map images. Two map images are equal if they have the same absolute source path and the same transparent color.
      Specified by:
      equals in interface IMapImage
      Overrides:
      equals in class java.lang.Object
      Parameters:
      anObject - The map image to test for equality with
      Returns:
      Whether this map image is equal to the provided map image, or false if anObject is not a map image
    • hashCode

      public int hashCode()
      Computes a hash code for this map image. The hash code for a map image is equal to the hash code of its absolute source path xor the hash code of its transparent color.
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      The hash code for this map image
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object