# CanvasComposite

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

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

```rust
enum CanvasComposite
```

How a composite effect combines its sources (Win2D `CanvasComposite`):
each source is composed onto what the sources before it made.

Every mode is drawn: the Porter-Duff modes with the blend layers of the
drawing contexts, `MaskInvert` from the pixels of the sources drawn
apart (winui-materials.md).

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

## Members

- [`SourceOver`](#variant-sourceover)
- [`DestinationOver`](#variant-destinationover)
- [`SourceIn`](#variant-sourcein)
- [`DestinationIn`](#variant-destinationin)
- [`SourceOut`](#variant-sourceout)
- [`DestinationOut`](#variant-destinationout)
- [`SourceAtop`](#variant-sourceatop)
- [`DestinationAtop`](#variant-destinationatop)
- [`Xor`](#variant-xor)
- [`Add`](#variant-add)
- [`Copy`](#variant-copy)
- [`BoundedCopy`](#variant-boundedcopy)
- [`MaskInvert`](#variant-maskinvert)

<a id="variant-sourceover"></a>

### SourceOver

```rust
SourceOver = 0
```

Each source drawn over the previous ones (the Win2D default).

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

<a id="variant-destinationover"></a>

### DestinationOver

```rust
DestinationOver = 1
```



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

<a id="variant-sourcein"></a>

### SourceIn

```rust
SourceIn = 2
```



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

<a id="variant-destinationin"></a>

### DestinationIn

```rust
DestinationIn = 3
```



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

<a id="variant-sourceout"></a>

### SourceOut

```rust
SourceOut = 4
```



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

<a id="variant-destinationout"></a>

### DestinationOut

```rust
DestinationOut = 5
```



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

<a id="variant-sourceatop"></a>

### SourceAtop

```rust
SourceAtop = 6
```



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

<a id="variant-destinationatop"></a>

### DestinationAtop

```rust
DestinationAtop = 7
```



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

<a id="variant-xor"></a>

### Xor

```rust
Xor = 8
```



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

<a id="variant-add"></a>

### Add

```rust
Add = 9
```



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

<a id="variant-copy"></a>

### Copy

```rust
Copy = 10
```



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

<a id="variant-boundedcopy"></a>

### BoundedCopy

```rust
BoundedCopy = 11
```



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

<a id="variant-maskinvert"></a>

### MaskInvert

```rust
MaskInvert = 12
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ResourceKeyObject`](/docs/0.5.0/api/ferroui-base/controls/trait-resourcekeyobject/)
- [`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`
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`

## Availability

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