# `Toddy.Iced.ContentFit`
[🔗](https://github.com/toddy-ui/toddy-elixir/blob/v0.3.0/lib/toddy/iced/content_fit.ex#L1)

Scaling mode for the `content_fit` prop on image and SVG widgets.

Maps to iced's `ContentFit` enum.

# `t`

```elixir
@type t() :: :contain | :cover | :fill | :none | :scale_down
```

# `encode`

```elixir
@spec encode(content_fit :: t()) :: String.t()
```

Encodes a content fit value to the wire format.

## Examples

    iex> Toddy.Iced.ContentFit.encode(:contain)
    "contain"

    iex> Toddy.Iced.ContentFit.encode(:cover)
    "cover"

    iex> Toddy.Iced.ContentFit.encode(:fill)
    "fill"

    iex> Toddy.Iced.ContentFit.encode(:none)
    "none"

    iex> Toddy.Iced.ContentFit.encode(:scale_down)
    "scale_down"

---

*Consult [api-reference.md](api-reference.md) for complete listing*
