Layer
public struct Layer : LayerProtocol, MutablePropertied
Layers capture the contents of a Map
can be one of four kinds
- Tile A grid of
Tile
s - __ Object__ A collection of
Object
s - Group A collection of
Layer
s enabling hierarchy within theMap
- Image An image not in a
TileSet
Every layer has a set of common attributes (such as an offest) and can capture user specified properites too.
-
An enumeration for each kind of layer, together with the specifc information about that kind of layer (e.g. the
See moreImageReference
for an Image LayerDeclaration
Swift
public enum Kind
-
A
LayerFilter
that matches against thename
property of theLayer
. Note that in Tiled layer names are not unique.Declaration
Swift
public static func named(_ name: String) -> LayerFilter
-
The name of the layer, or an empty
String
if non was specifiedDeclaration
Swift
public let name: String
-
true
if the layer should be visibleDeclaration
Swift
public let visible: Bool
-
A level of transparent the layer (and therefore its contents) should be rendered with
Declaration
Swift
public let opacity: Double
-
An offset from the
Layer
s parent’s originDeclaration
Swift
public let position: Position
-
The
Layer.Kind
of theLayer
together with the information specific to that kindDeclaration
Swift
public let kind: Kind
-
If
true
any editing operations should not be applied to thisLayer
Declaration
Swift
public var locked: Bool
-
Any tint that should be applied to the
Layer
and its contentsDeclaration
Swift
public var tintColor: Color?
-
User specified
Properties
of the layerDeclaration
Swift
public var properties: Properties