Class ImageLayer
java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.xml.CustomPropertyProvider
de.gurkenlabs.litiengine.environment.tilemap.xml.Layer
de.gurkenlabs.litiengine.environment.tilemap.xml.ImageLayer
- All Implemented Interfaces:
ICustomPropertyProvider, IImageLayer, ILayer
Represents an image layer in a tile map. This class extends the
Layer class and implements the IImageLayer interface. It includes
attributes for repeating the image horizontally and vertically, the image itself, and a transparent color.-
Constructor Summary
ConstructorsConstructorDescriptionDefault no-args constructor for theImageLayerclass.ImageLayer(ImageLayer original) Copy constructor for theImageLayerclass. -
Method Summary
Modifier and TypeMethodDescriptiongetImage()Gets the image.doubleGets the horizontal offset of the layer.doubleGets the vertical offset of the layer.Gets the transparent color.booleanGets a value indicating whether the image should be rendered repeatedly horizontally.booleanGets a value indicating whether the image should be rendered repeatedly vertically.voidMethods inherited from class Layer
afterUnmarshal, getHeight, getHorizontalParallaxFactor, getId, getMap, getName, getOffset, getOpacity, getRenderType, getSizeInTiles, getTintColor, getVerticalParallaxFactor, getWidth, isVisible, setHeight, setMap, setName, setOpacity, setRenderType, setTintColor, setVisible, setWidthMethods inherited from class CustomPropertyProvider
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, setValueMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, setValueMethods inherited from interface ILayer
getHeight, getHorizontalParallaxFactor, getId, getMap, getName, getOffset, getOpacity, getRenderType, getSizeInTiles, getTintColor, getVerticalParallaxFactor, getWidth, isVisible, setHeight, setName, setOpacity, setRenderType, setTintColor, setVisible, setWidth
-
Constructor Details
-
ImageLayer
public ImageLayer()Default no-args constructor for theImageLayerclass. Initializes a new instance of theImageLayerclass with default values. -
ImageLayer
Copy constructor for theImageLayerclass. Creates a new instance of theImageLayerclass by copying the properties from the providedImageLayerobject.- Parameters:
original- The originalImageLayerobject to copy from.
-
-
Method Details
-
getImage
Description copied from interface:IImageLayerGets the image.- Specified by:
getImagein interfaceIImageLayer- Returns:
- the image
-
setImage
-
getTransparentColor
Description copied from interface:IImageLayerGets the transparent color.- Specified by:
getTransparentColorin interfaceIImageLayer- Returns:
- the transparent color
-
repeatHorizontally
public boolean repeatHorizontally()Description copied from interface:IImageLayerGets a value indicating whether the image should be rendered repeatedly horizontally.- Specified by:
repeatHorizontallyin interfaceIImageLayer- Returns:
- True if the image should be repeated horizontally; Otherwise false.
-
repeatVertically
public boolean repeatVertically()Description copied from interface:IImageLayerGets a value indicating whether the image should be rendered repeatedly vertically.- Specified by:
repeatVerticallyin interfaceIImageLayer- Returns:
- True if the image should be repeated vertically; Otherwise false.
-
getOffsetX
public double getOffsetX()Description copied from interface:ILayerGets the horizontal offset of the layer.- Specified by:
getOffsetXin interfaceILayer- Overrides:
getOffsetXin classLayer- Returns:
- the x offset
-
getOffsetY
public double getOffsetY()Description copied from interface:ILayerGets the vertical offset of the layer.- Specified by:
getOffsetYin interfaceILayer- Overrides:
getOffsetYin classLayer- Returns:
- the y offset
-