MTStyleImageOptions

public struct MTStyleImageOptions : Codable, Equatable, Sendable

Configuration that controls how an image is registered within the MapTiler style.

  • Pixel ratio of the supplied image. Values below zero are ignored.

    Declaration

    Swift

    public var pixelRatio: Double?
  • sdf

    Indicates whether the image should be interpreted as a signed distance field.

    Declaration

    Swift

    public var sdf: Bool?
  • Horizontal stretch ranges applied when rendering the image.

    Declaration

    Swift

    public var stretchX: [Stretch]?
  • Vertical stretch ranges applied when rendering the image.

    Declaration

    Swift

    public var stretchY: [Stretch]?
  • Content insets that describe the stretchable area of the image.

    Declaration

    Swift

    public var content: Content?
  • Creates a new set of image options.

    Declaration

    Swift

    public init(
        pixelRatio: Double? = nil,
        sdf: Bool? = nil,
        stretchX: [Stretch]? = nil,
        stretchY: [Stretch]? = nil,
        content: Content? = nil
    )

    Parameters

    pixelRatio

    Pixel ratio of the supplied image.

    sdf

    Indicates whether the image should be interpreted as a signed distance field.

    stretchX

    Horizontal stretch ranges applied when rendering the image.

    stretchY

    Vertical stretch ranges applied when rendering the image.

    content

    Insets describing the stretchable area of the image.

  • Describes a stretchable segment on an axis.

    See more

    Declaration

    Swift

    struct Stretch : Codable, Equatable, Sendable
  • Insets that describe the stretchable area of the image.

    See more

    Declaration

    Swift

    struct Content : Codable, Equatable, Sendable