# GeometricClip

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

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

```rust
struct GeometricClip
```

A clip that leaves visible the inside of a geometry (WinUI
`Microsoft.UI.Composition.GeometricClip`), in the coordinates of the
visual it is set on, or of its `view_box` when it has
one: the view box maps the geometry onto the size of the visual as for a
shape visual. The transform of the clip applies after the view box. A
change of the geometry (its trimming and animations included) or of the
view box changes the clip.

Deviation (winui-composition.md): a geometric clip without a geometry
clips nothing; the trimming of the geometry applies to the clip.

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

## Members

- [`from_clip`](#function-from_clip)
- [`geometry`](#function-geometry)
- [`set_geometry`](#function-set_geometry)
- [`view_box`](#function-view_box)
- [`set_view_box`](#function-set_view_box)

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

### from_clip

```rust
fn from_clip(clip: &Rc<CompositionClip>) -> Option<GeometricClip>
```

The handle of `clip` as a geometric clip, if it is one.

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

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

### geometry

```rust
fn geometry(self: &Self) -> Option<Rc<CompositionGeometry>>
```

The geometry whose inside stays visible.

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

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

### set_geometry

```rust
fn set_geometry(self: &Self, value: Option<Rc<CompositionGeometry>>)
```



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

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

### view_box

```rust
fn view_box(self: &Self) -> Option<Rc<CompositionViewBox>>
```

The area of the geometry coordinates mapped onto the visual.

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

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

### set_view_box

```rust
fn set_view_box(self: &Self, value: Option<Rc<CompositionViewBox>>)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Deref`

## Availability

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