# BaseBrushAnimator

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/animation/animators/struct-basebrushanimator/

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

```rust
struct BaseBrushAnimator
```

Animator that handles all animations on properties with a brush as their
type: redirects them to the animator for the kind of brushes in the key
frames.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animators/base_brush_animator.rs#L21)

## Members

- [`new`](#function-new)
- [`register_brush_animator`](#function-register_brush_animator)

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

### new

```rust
fn new() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animators/base_brush_animator.rs#L26)

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

### register_brush_animator

```rust
fn register_brush_animator<TAnimator: Animator + Default>(condition: impl Fn(&dyn IBrush) -> bool + 'static)
```

Registers an animator for brushes for which `condition` holds; it is
selected by the brush of the first key frame. Later registrations
take precedence.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animators/base_brush_animator.rs#L33)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`IAnimator`](/docs/0.5.0/api/ferroui-base/animation/trait-ianimator/)
- [`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`
- `Default`
- [`Animator`](/docs/0.5.0/api/ferroui-base/animation/animators/trait-animator/)

## Availability

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