Interface ILayer

All Superinterfaces:
ICustomPropertyProvider
All Known Subinterfaces:
IGroupLayer, IImageLayer, IMapObjectLayer, ITileLayer
All Known Implementing Classes:
GroupLayer, ImageLayer, Layer, MapObjectLayer, TileLayer

public interface ILayer extends ICustomPropertyProvider
  • Method Details

    • getId

      int getId()
      Gets the unique id of the layer.
      Returns:
      the layer id
    • getName

      String getName()
      Gets the name.
      Returns:
      the name
    • setName

      void setName(String name)
      Sets the name of the layer.
      Parameters:
      name - the layer name
    • getOpacity

      float getOpacity()
      Gets the opacity.
      Returns:
      the opacity
    • setOpacity

      void setOpacity(float opacity)
      Sets the opacity of the layer in the range [0, 1].
      Parameters:
      opacity - the opacity to set
    • getOffset

      Point2D getOffset()
      Gets both the X and the Y offset of the layer.
      Returns:
      a Point2D representing the offset
    • getOffsetX

      double getOffsetX()
      Gets the horizontal offset of the layer.
      Returns:
      the x offset
    • getOffsetY

      double getOffsetY()
      Gets the vertical offset of the layer.
      Returns:
      the y offset
    • getHorizontalParallaxFactor

      double getHorizontalParallaxFactor()
      Gets the horizontal parallax scrolling factor of the layer. Defaults to 1.0.
      Returns:
      The horizontal parallax scrolling factor.
    • getVerticalParallaxFactor

      double getVerticalParallaxFactor()
      Gets the vertical parallax scrolling factor of the layer. Defaults to 1.0.
      Returns:
      The vertical parallax scrolling factor.
    • getTintColor

      Color getTintColor()
      Gets a tint color that affects the way contents of this layer are rendered.
      Returns:
      A color that is used to tint the visible contents of this layer.
    • setTintColor

      void setTintColor(Color tintcolor)
      Sets the tint color of this layer.
      Parameters:
      tintcolor - The tint color of this layer.
    • getSizeInTiles

      Dimension getSizeInTiles()
      Gets the size in tiles.
      Returns:
      the size in tiles
    • getMap

      IMap getMap()
      Gets the map that owns this layer.
      Returns:
      the owning map
    • isVisible

      boolean isVisible()
      Checks if is visible.
      Returns:
      true, if is visible
    • setVisible

      void setVisible(boolean visible)
      Sets whether the layer is visible.
      Parameters:
      visible - true to make the layer visible
    • getRenderType

      RenderType getRenderType()
      Gets the render type used when drawing this layer.
      Returns:
      the render type
    • setRenderType

      void setRenderType(RenderType renderType)
      Sets the render type used when drawing this layer.
      Parameters:
      renderType - the render type
    • getWidth

      int getWidth()
      Gets the width of the layer, in tiles.
      Returns:
      the width in tiles
    • setWidth

      void setWidth(int newWidth)
      Sets the width of the layer, in tiles.
      Parameters:
      newWidth - the new width in tiles
    • getHeight

      int getHeight()
      Gets the height of the layer, in tiles.
      Returns:
      the height in tiles
    • setHeight

      void setHeight(int newWidth)
      Sets the height of the layer, in tiles.
      Parameters:
      newWidth - the new height in tiles