# CompositionShapeCollection

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

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

```rust
struct CompositionShapeCollection
```

The shapes of a shape visual or of a container shape (WinUI
`Microsoft.UI.Composition.CompositionShapeCollection`), drawn in order.

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

## Members

- [`items`](#function-items)
- [`append`](#function-append)
- [`add`](#function-add)
- [`clear`](#function-clear)
- [`contains`](#function-contains)
- [`remove`](#function-remove)
- [`count`](#function-count)
- [`index_of`](#function-index_of)
- [`insert`](#function-insert)
- [`remove_at`](#function-remove_at)
- [`get`](#function-get)
- [`set`](#function-set)

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

### items

```rust
fn items(self: &Self) -> Vec<Rc<CompositionShape>>
```

A snapshot of the shapes, for enumeration.

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

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

### append

```rust
fn append(self: &Self, item: Rc<CompositionShape>)
```

`Append`: adds a shape at the end (drawn last).

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

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

### add

```rust
fn add(self: &Self, item: Rc<CompositionShape>)
```



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

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

### clear

```rust
fn clear(self: &Self)
```



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

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

### contains

```rust
fn contains(self: &Self, item: &Rc<CompositionShape>) -> bool
```



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

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

### remove

```rust
fn remove(self: &Self, item: &Rc<CompositionShape>) -> bool
```



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

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

### count

```rust
fn count(self: &Self) -> usize
```

`Size` of the WinUI vector.

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

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

### index_of

```rust
fn index_of(self: &Self, item: &Rc<CompositionShape>) -> Option<usize>
```



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

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

### insert

```rust
fn insert(self: &Self, index: usize, item: Rc<CompositionShape>)
```



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

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

### remove_at

```rust
fn remove_at(self: &Self, index: usize)
```



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

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

### get

```rust
fn get(self: &Self, index: usize) -> Rc<CompositionShape>
```



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

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

### set

```rust
fn set(self: &Self, index: usize, value: Rc<CompositionShape>)
```



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

## 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`
- `CompositionShapeCollectionHooks<CompositionShape>`
- `IRegisterForSerialization`
- `ICompositionObjectHost`
- [`ICompositionObjectAnimations`](/docs/0.5.0/api/ferroui-base/rendering/composition/trait-icompositionobjectanimations/)
- [`AsCompositionObject`](/docs/0.5.0/api/ferroui-base/rendering/composition/trait-ascompositionobject/)
- `ICompositionObject`
- `ICompositorSerializable`

## Availability

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