# CompositionStretch

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/rendering/composition/enum-compositionstretch/

**enum** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
enum CompositionStretch
```

How the content of a composition surface brush fills the area of the
brush (WinUI `CompositionStretch`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/enums.rs#L105)

## Members

- [`None`](#variant-none)
- [`Fill`](#variant-fill)
- [`Uniform`](#variant-uniform)
- [`UniformToFill`](#variant-uniformtofill)

<a id="variant-none"></a>

### None

```rust
None = 0
```

The content keeps its natural size.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/enums.rs#L108)

<a id="variant-fill"></a>

### Fill

```rust
Fill = 1
```

The content is scaled to the area, without keeping its aspect ratio.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/enums.rs#L110)

<a id="variant-uniform"></a>

### Uniform

```rust
Uniform = 2
```

The content is scaled to fit inside the area, keeping its aspect ratio.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/enums.rs#L112)

<a id="variant-uniformtofill"></a>

### UniformToFill

```rust
UniformToFill = 3
```

The content is scaled to cover the area, keeping its aspect ratio; the
part outside the area is clipped.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/enums.rs#L115)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ResourceKeyObject`](/docs/0.5.0/api/ferroui-base/controls/trait-resourcekeyobject/)
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `ServerPropertyValue`
- `BatchValue`
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
