# MaskTransitionEffect

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/effects/library/struct-masktransitioneffect/

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

```rust
struct MaskTransitionEffect
```

Reveals a page over the content through a mask (the reveal of Effector's
dissolve, with the content as the page that leaves): `to-page` is drawn
where the luminance of `mask` (premultiplied) is below the threshold
`progress * (1 + softness)`, fading in over `softness` of luminance
(clamped to 0.001..1); `progress` is clamped to 0..1, so 0 shows the
content and 1 the page. The page and the mask are stretched over the
area. A horizontal gradient as the mask is a wipe, a noise a dissolve;
without a mask the page fades in (fully at a progress of
`softness / (1 + softness)`).

`mask-transition(progress=0.5, softness=0.1)`, the images set from code.
An overlay shader effect with two children, drawn source over the
content; a progress of 0 (the neutral value) leaves the content
unchanged.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/transitions.rs#L293)

## Members

- [`to_page`](#struct_field-to_page)
- [`mask`](#struct_field-mask)
- [`progress`](#struct_field-progress)
- [`softness`](#struct_field-softness)

<a id="struct_field-to_page"></a>

### to_page

```rust
to_page: super::super::EffectImage
```

The page the transition reveals.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/transitions.rs#L295)

<a id="struct_field-mask"></a>

### mask

```rust
mask: super::super::EffectImage
```

The mask: dark parts are revealed first.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/transitions.rs#L297)

<a id="struct_field-progress"></a>

### progress

```rust
progress: f64
```

How far the transition is, 0 to 1 (default 0.5).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/transitions.rs#L299)

<a id="struct_field-softness"></a>

### softness

```rust
softness: f64
```

The width of the soft edge, in luminance, 0.001 to 1 (default 0.1).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/library/transitions.rs#L301)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`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`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Default`
- [`CustomEffect`](/docs/0.5.0/api/ferroui-base/media/effects/trait-customeffect/)

## Availability

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