# CubicBezierEasingFunction

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

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

```rust
struct CubicBezierEasingFunction
```

A cubic Bezier curve from `(0, 0)` to `(1, 1)` with two control points
(WinUI `CubicBezierEasingFunction`); the curve of
`SplineEasing`.

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

## Members

- [`new`](#function-new)
- [`control_point1`](#function-control_point1)
- [`control_point2`](#function-control_point2)

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

### new

```rust
fn new(control_point1: Vector2, control_point2: Vector2) -> CubicBezierEasingFunction
```

Creates the curve. Panics when the X coordinate of a control point is
outside `[0, 1]` (WinUI throws).

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

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

### control_point1

```rust
fn control_point1(self: &Self) -> Vector2
```

The first control point.

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

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

### control_point2

```rust
fn control_point2(self: &Self) -> Vector2
```

The second control point.

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

## 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`
- [`IEasing`](/docs/0.5.0/api/ferroui-base/animation/easings/trait-ieasing/)
- `From<CubicBezierEasingFunction>`

## Availability

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