ImageLayer class

Inheritance

Constructors

ImageLayer({int? id, required String name, String? class_, int x = 0, int y = 0, double offsetX = 0, double offsetY = 0, double parallaxX = 1, double parallaxY = 1, int? startX, int? startY, String? tintColorHex, Color? tintColor, double opacity = 1, bool visible = true, CustomProperties properties = CustomProperties.empty, required TiledImage image, required bool repeatX, required bool repeatY, String? transparentColorHex, Color? transparentColor})

Properties

class_ String?
The "Class" specified in Tiled, introduced in Tiled 1.9 to support custom types on any object. This is NOT the same as type
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
id int?
Incremental ID - unique across all layers
getter/setter pairinherited
image TiledImage
Image used by this layer.
getter/setter pair
name String
Name assigned to this layer. Always present; might be an empty string.
getter/setter pairinherited
offsetX double
Horizontal layer offset in pixels (default: 0)
getter/setter pairinherited
offsetY double
Vertical layer offset in pixels (default: 0)
getter/setter pairinherited
opacity double
The opacity of the layer as a value from 0 to 1. Defaults to 1.
getter/setter pairinherited
parallaxX double
Horizontal parallax factor for this layer (default: 1). (since Tiled 1.5) See: https://doc.mapeditor.org/en/stable/manual/layers/#parallax-factor
getter/setter pairinherited
parallaxY double
Vertical parallax factor for this layer (default: 1). (since Tiled 1.5) See: https://doc.mapeditor.org/en/stable/manual/layers/#parallax-factor
getter/setter pairinherited
properties CustomProperties
List of Property.
getter/setter pairinherited
repeatX bool
Whether or not to repeat the image on the X-axis
getter/setter pair
repeatY bool
Whether or not to repeat the image on the Y-axis
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startX int?
X coordinate where layer content starts (for infinite maps)
getter/setter pairinherited
startY int?
Y coordinate where layer content starts (for infinite maps)
getter/setter pairinherited
tintColor Color?
Color that is multiplied with any graphics drawn by this layer or any child layers (optional).
getter/setter pairinherited
tintColorHex String?
Hex-formatted tint color (#RRGGBB or #AARRGGBB) that is multiplied with any graphics drawn by this layer or any child layers (optional).
getter/setter pairinherited
transparentColor Color?
Color to be rendered as transparent (optional).
getter/setter pair
transparentColorHex String?
Hex-formatted color (#RRGGBB or #AARRGGBB) to be rendered as transparent (optional).
getter/setter pair
type LayerType
Each type is associated with a concrete implementation of Layer.
getter/setter pairinherited
visible bool
Whether layer is shown or hidden in editor.
getter/setter pairinherited
x int
Horizontal layer offset in tiles. Always 0.
getter/setter pairinherited
y int
Vertical layer offset in tiles. Always 0.
getter/setter pairinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited