# CompositionEasingFunction

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

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

```rust
struct CompositionEasingFunction
```

The factories of the easing functions (the statics of WinUI
`CompositionEasingFunction`, Windows App SDK 1.4+). Each returns the
[`Easing`](/docs/0.5.0/api/ferroui-base/animation/easings/struct-easing/) handle key frames take; create the typed function
(`BackEasingFunction::new`) to read its members.

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

## Members

- [`create_cubic_bezier_easing_function`](#function-create_cubic_bezier_easing_function)
- [`create_linear_easing_function`](#function-create_linear_easing_function)
- [`create_step_easing_function`](#function-create_step_easing_function)
- [`create_step_easing_function_with_step_count`](#function-create_step_easing_function_with_step_count)
- [`create_back_easing_function`](#function-create_back_easing_function)
- [`create_bounce_easing_function`](#function-create_bounce_easing_function)
- [`create_circle_easing_function`](#function-create_circle_easing_function)
- [`create_elastic_easing_function`](#function-create_elastic_easing_function)
- [`create_exponential_easing_function`](#function-create_exponential_easing_function)
- [`create_power_easing_function`](#function-create_power_easing_function)
- [`create_sine_easing_function`](#function-create_sine_easing_function)

<a id="function-create_cubic_bezier_easing_function"></a>

### create_cubic_bezier_easing_function

```rust
fn create_cubic_bezier_easing_function(_owner: &Compositor, control_point1: Vector2, control_point2: Vector2) -> Easing
```

A cubic Bezier curve with the given control points.

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

<a id="function-create_linear_easing_function"></a>

### create_linear_easing_function

```rust
fn create_linear_easing_function(_owner: &Compositor) -> Easing
```

The linear curve.

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

<a id="function-create_step_easing_function"></a>

### create_step_easing_function

```rust
fn create_step_easing_function(_owner: &Compositor) -> Easing
```

A step function with one step.

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

<a id="function-create_step_easing_function_with_step_count"></a>

### create_step_easing_function_with_step_count

```rust
fn create_step_easing_function_with_step_count(_owner: &Compositor, step_count: i32) -> Easing
```

A step function with `step_count` steps.

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

<a id="function-create_back_easing_function"></a>

### create_back_easing_function

```rust
fn create_back_easing_function(_owner: &Compositor, mode: CompositionEasingFunctionMode, amplitude: f32) -> Easing
```

A back curve.

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

<a id="function-create_bounce_easing_function"></a>

### create_bounce_easing_function

```rust
fn create_bounce_easing_function(_owner: &Compositor, mode: CompositionEasingFunctionMode, bounces: i32, bounciness: f32) -> Easing
```

A bounce curve.

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

<a id="function-create_circle_easing_function"></a>

### create_circle_easing_function

```rust
fn create_circle_easing_function(_owner: &Compositor, mode: CompositionEasingFunctionMode) -> Easing
```

A circle curve.

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

<a id="function-create_elastic_easing_function"></a>

### create_elastic_easing_function

```rust
fn create_elastic_easing_function(_owner: &Compositor, mode: CompositionEasingFunctionMode, oscillations: i32, springiness: f32) -> Easing
```

An elastic curve.

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

<a id="function-create_exponential_easing_function"></a>

### create_exponential_easing_function

```rust
fn create_exponential_easing_function(_owner: &Compositor, mode: CompositionEasingFunctionMode, exponent: f32) -> Easing
```

An exponential curve.

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

<a id="function-create_power_easing_function"></a>

### create_power_easing_function

```rust
fn create_power_easing_function(_owner: &Compositor, mode: CompositionEasingFunctionMode, power: f32) -> Easing
```

A power curve.

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

<a id="function-create_sine_easing_function"></a>

### create_sine_easing_function

```rust
fn create_sine_easing_function(_owner: &Compositor, mode: CompositionEasingFunctionMode) -> Easing
```

A sine curve.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ErasedDestructor`
- `IntoEither`

## Availability

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