---
title: "Stretch | Mobile sdk | Mobile sdk ios | Ios"
description: "Describes a stretchable segment on an axis."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Stretch

```
struct Stretch : Codable, Equatable, Sendable
```

Describes a stretchable segment on an axis.

-   `[from](#/s:11MapTilerSDK19MTStyleImageOptionsV7StretchV4fromSdvp)`
    
    Starting point of the stretch range.
    
    #### Declaration
    
    Swift
    
    ```
    public var from: Double
    ```
    
-   `[to](#/s:11MapTilerSDK19MTStyleImageOptionsV7StretchV2toSdvp)`
    
    Ending point of the stretch range.
    
    #### Declaration
    
    Swift
    
    ```
    public var to: Double
    ```
    
-   `[init(from:to:)](#/s:11MapTilerSDK19MTStyleImageOptionsV7StretchV4from2toAESd_Sdtcfc)`
    
    Creates a new stretch segment.
    
    #### Declaration
    
    Swift
    
    ```
    public init(from: Double, to: Double)
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>from</em></code></td><td><div><p>Starting point of the stretch range.</p></div></td></tr><tr><td><code><em>to</em></code></td><td><div><p>Ending point of the stretch range.</p></div></td></tr></tbody></table>
    
-   `[encode(to:)](#/s:SE6encode2toys7Encoder_p_tKF)`
    
    #### Declaration
    
    Swift
    
    ```
    public func encode(to encoder: Encoder) throws
    ```
    
-   `[init(from:)](#/s:Se4fromxs7Decoder_p_tKcfc)`
    
    #### Declaration
    
    Swift
    
    ```
    public init(from decoder: Decoder) throws
    ```
