# LinearTransferEffect

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/rendering/composition/effects/struct-lineartransfereffect/

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

```rust
struct LinearTransferEffect
```

Maps each channel of its source through a line, `slope * c + offset`
(Win2D `LinearTransferEffect`): a colour matrix that scales each channel
and adds an offset. A disabled channel is kept as it is. Animatable:
`RedSlope`, `RedOffset`, `GreenSlope`, `GreenOffset`, `BlueSlope`,
`BlueOffset`, `AlphaSlope`, `AlphaOffset`.

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

## Members

- [`name`](#struct_field-name)
- [`red_offset`](#struct_field-red_offset)
- [`red_slope`](#struct_field-red_slope)
- [`red_disable`](#struct_field-red_disable)
- [`green_offset`](#struct_field-green_offset)
- [`green_slope`](#struct_field-green_slope)
- [`green_disable`](#struct_field-green_disable)
- [`blue_offset`](#struct_field-blue_offset)
- [`blue_slope`](#struct_field-blue_slope)
- [`blue_disable`](#struct_field-blue_disable)
- [`alpha_offset`](#struct_field-alpha_offset)
- [`alpha_slope`](#struct_field-alpha_slope)
- [`alpha_disable`](#struct_field-alpha_disable)
- [`alpha_mode`](#struct_field-alpha_mode)
- [`clamp_output`](#struct_field-clamp_output)
- [`source`](#struct_field-source)

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

### name

```rust
name: String
```

The name of the effect.

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

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

### red_offset

```rust
red_offset: f32
```

The offset of red (default 0).

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

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

### red_slope

```rust
red_slope: f32
```

The slope of red (default 1).

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

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

### red_disable

```rust
red_disable: bool
```

Whether red is kept as it is (default `false`).

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

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

### green_offset

```rust
green_offset: f32
```

The offset of green (default 0).

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

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

### green_slope

```rust
green_slope: f32
```

The slope of green (default 1).

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

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

### green_disable

```rust
green_disable: bool
```

Whether green is kept as it is (default `false`).

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

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

### blue_offset

```rust
blue_offset: f32
```

The offset of blue (default 0).

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

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

### blue_slope

```rust
blue_slope: f32
```

The slope of blue (default 1).

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

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

### blue_disable

```rust
blue_disable: bool
```

Whether blue is kept as it is (default `false`).

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

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

### alpha_offset

```rust
alpha_offset: f32
```

The offset of alpha (default 0).

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

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

### alpha_slope

```rust
alpha_slope: f32
```

The slope of alpha (default 1).

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

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

### alpha_disable

```rust
alpha_disable: bool
```

Whether alpha is kept as it is (default `false`).

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

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

### alpha_mode

```rust
alpha_mode: crate::media::ColorMatrixAlphaMode
```

Whether the lines apply to premultiplied or straight colours
(default premultiplied: the colour is un-premultiplied first).

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

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

### clamp_output

```rust
clamp_output: bool
```

Whether the output is clamped (stored; the drawing contexts clamp).

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

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

### source

```rust
source: Option<GraphicsEffectSource>
```

The input.

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

## 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`
- `From<LinearTransferEffect>`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Default`

## Availability

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