# CompositionGeometry

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

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

```rust
struct CompositionGeometry
```

The geometry of a sprite shape or a geometric clip (WinUI
`Microsoft.UI.Composition.CompositionGeometry`), with the animatable
trimming of its outline: `TrimStart` and `TrimEnd` (fractions of the
length of the outline, default 0 and 1) and `TrimOffset` (added to both,
wrapping around the outline).

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

## Members

- [`compositor`](#function-compositor)
- [`object`](#function-object)
- [`is_disposed`](#function-is_disposed)
- [`dispose`](#function-dispose)
- [`type_name`](#function-type_name)
- [`trim_end`](#function-trim_end)
- [`set_trim_end`](#function-set_trim_end)
- [`trim_offset`](#function-trim_offset)
- [`set_trim_offset`](#function-set_trim_offset)
- [`trim_start`](#function-trim_start)
- [`set_trim_start`](#function-set_trim_start)

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

### compositor

```rust
fn compositor(self: &Self) -> &Rc<Compositor>
```



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

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

### object

```rust
fn object(self: &Self) -> &CompositionObject
```

The embedded `CompositionObject`.

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

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

### is_disposed

```rust
fn is_disposed(self: &Self) -> bool
```



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

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

### dispose

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



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

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

### type_name

```rust
fn type_name(self: &Self) -> &'static str
```

The name of the concrete class, for messages.

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

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

### trim_end

```rust
fn trim_end(self: &Self) -> f32
```

Where the drawn part of the outline ends, as a fraction of its length
(default 1).

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

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

### set_trim_end

```rust
fn set_trim_end(self: &Self, value: f32)
```



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

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

### trim_offset

```rust
fn trim_offset(self: &Self) -> f32
```

How far along the outline both trim points are moved, as a fraction
of its length; the drawn part wraps around the start of the outline.

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

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

### set_trim_offset

```rust
fn set_trim_offset(self: &Self, value: f32)
```



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

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

### trim_start

```rust
fn trim_start(self: &Self) -> f32
```

Where the drawn part of the outline starts, as a fraction of its
length (default 0).

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

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

### set_trim_start

```rust
fn set_trim_start(self: &Self, value: f32)
```



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

## 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`
- `CompositionGeometryHooks`
- `CompositionRectangleGeometryHooks`
- `CompositionRoundedRectangleGeometryHooks`
- `CompositionEllipseGeometryHooks`
- `CompositionLineGeometryHooks`
- `CompositionPathGeometryHooks`
- `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/).
