Interface ILayer
- All Superinterfaces:
ICustomPropertyProvider
- All Known Subinterfaces:
IGroupLayer, IImageLayer, IMapObjectLayer, ITileLayer
- All Known Implementing Classes:
GroupLayer, ImageLayer, Layer, MapObjectLayer, TileLayer
-
Method Summary
Modifier and TypeMethodDescriptionintGets the height of the layer, in tiles.doubleGets the horizontal parallax scrolling factor of the layer.intgetId()Gets the unique id of the layer.getMap()Gets the map that owns this layer.getName()Gets the name.Gets both the X and the Y offset of the layer.doubleGets the horizontal offset of the layer.doubleGets the vertical offset of the layer.floatGets the opacity.Gets the render type used when drawing this layer.Gets the size in tiles.Gets a tint color that affects the way contents of this layer are rendered.doubleGets the vertical parallax scrolling factor of the layer.intgetWidth()Gets the width of the layer, in tiles.booleanChecks if is visible.voidsetHeight(int newWidth) Sets the height of the layer, in tiles.voidSets the name of the layer.voidsetOpacity(float opacity) Sets the opacity of the layer in the range[0, 1].voidsetRenderType(RenderType renderType) Sets the render type used when drawing this layer.voidsetTintColor(Color tintcolor) Sets the tint color of this layer.voidsetVisible(boolean visible) Sets whether the layer is visible.voidsetWidth(int newWidth) Sets the width of the layer, in tiles.Methods inherited from interface ICustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getCharValue, getCharValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getMapObjectId, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, hasCustomProperty, removeProperty, setProperties, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
-
Method Details
-
getId
int getId()Gets the unique id of the layer.- Returns:
- the layer id
-
getName
-
setName
-
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
-
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
Sets the tint color of this layer.- Parameters:
tintcolor- The tint color of this layer.
-
getSizeInTiles
-
getMap
-
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-trueto make the layer visible
-
getRenderType
RenderType getRenderType()Gets the render type used when drawing this layer.- Returns:
- the render type
-
setRenderType
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
-