# VelloOptions

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-vello/struct-vellooptions/

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

```rust
struct VelloOptions
```

Options for the Vello rendering subsystem.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Vello/FerroUI.Vello/vello_options.rs#L20)

## Members

- [`rendering_modes`](#struct_field-rendering_modes)
- [`use_opacity_save_layer`](#struct_field-use_opacity_save_layer)
- [`new`](#function-new)
- [`with_rendering_mode`](#function-with_rendering_mode)
- [`rendering_mode_order`](#function-rendering_mode_order)

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

### rendering_modes

```rust
rendering_modes: [Option<VelloRenderingMode>; 3]
```

The rendering modes in the order they are tried: the first one that
is available draws. `None` ends the list.

The hybrid and the GPU mode draw the window of a platform that
renders on a graphics device, and each is available when the crate
was built with its feature (`hybrid`, `gpu`) and the device runs it.
What is drawn into memory (render target bitmaps, layers, the
framebuffer of a platform that renders in software) is drawn by the
CPU mode whenever the list has it, wherever it stands: a scene that
ends as pixels in memory gains nothing from a round over the GPU. A
list without the CPU mode draws those in its GPU modes too, and has
no mode that can draw on a machine without a graphics device.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Vello/FerroUI.Vello/vello_options.rs#L33)

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

### use_opacity_save_layer

```rust
use_opacity_save_layer: bool
```

Use a layer to apply opacity, so that every visual is rendered to
its own layer when opacity is applied.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Vello/FerroUI.Vello/vello_options.rs#L37)

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

### new

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

Creates the default options.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Vello/FerroUI.Vello/vello_options.rs#L60)

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

### with_rendering_mode

```rust
fn with_rendering_mode(mode: VelloRenderingMode) -> Self
```

The options with one rendering mode and no other to fall back to.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Vello/FerroUI.Vello/vello_options.rs#L65)

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

### rendering_mode_order

```rust
fn rendering_mode_order(self: &Self) -> Vec<VelloRenderingMode>
```

The rendering modes in the order they are tried.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Vello/FerroUI.Vello/vello_options.rs#L70)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`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/)
- `ErasedDestructor`
- `IntoEither`
- `SimdFrom<T, S>`
- `SimdInto<T, S>`
- `Equivalent<K>`
- `Pointable`
- `AutoreleaseSafe`
- `Clone`
- `Copy`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Default`

## Availability

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