Layer

public struct Layer : LayerProtocol, MutablePropertied

Layers capture the contents of a Map can be one of four kinds

  • Tile A grid of Tiles
  • __ Object__ A collection of Objects
  • Group A collection of Layers enabling hierarchy within the Map
  • 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 ImageReference for an Image Layer

    See more

    Declaration

    Swift

    public enum Kind
  • A LayerFilter that matches against the name property of the Layer. 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 specified

    Declaration

    Swift

    public let name: String
  • true if the layer should be visible

    Declaration

    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 Layers parent’s origin

    Declaration

    Swift

    public let position: Position
  • The Layer.Kind of the Layer together with the information specific to that kind

    Declaration

    Swift

    public let kind: Kind
  • If true any editing operations should not be applied to this Layer

    Declaration

    Swift

    public var locked: Bool
  • Any tint that should be applied to the Layer and its contents

    Declaration

    Swift

    public var tintColor: Color?
  • User specified Properties of the layer

    Declaration

    Swift

    public var properties: Properties
  • The Objects contained in the Layer. Will be an empty Array if it is not an object Layer

    Declaration

    Swift

    public var objects: [Object] { get }