# CompositionClip

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

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

```rust
struct CompositionClip
```

A clip of a visual (WinUI `Microsoft.UI.Composition.CompositionClip`):
the area of the visual that stays visible, with its own animatable
transform (`AnchorPoint`, `CenterPoint`, `Offset`, `RotationAngle`,
`Scale`, `TransformMatrix`) in the space of the visual.

Deviation (winui-composition.md): `AnchorPoint` is relative to the size of
the visual the clip is set on; `RotationAngleInDegrees` is a view of
`RotationAngle` and cannot be the target of an animation.

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

## Members

- [`compositor`](#function-compositor)
- [`object`](#function-object)
- [`is_disposed`](#function-is_disposed)
- [`dispose`](#function-dispose)
- [`type_name`](#function-type_name)
- [`anchor_point`](#function-anchor_point)
- [`set_anchor_point`](#function-set_anchor_point)
- [`center_point`](#function-center_point)
- [`set_center_point`](#function-set_center_point)
- [`offset`](#function-offset)
- [`set_offset`](#function-set_offset)
- [`rotation_angle`](#function-rotation_angle)
- [`set_rotation_angle`](#function-set_rotation_angle)
- [`rotation_angle_in_degrees`](#function-rotation_angle_in_degrees)
- [`set_rotation_angle_in_degrees`](#function-set_rotation_angle_in_degrees)
- [`scale`](#function-scale)
- [`set_scale`](#function-set_scale)
- [`transform_matrix`](#function-transform_matrix)
- [`set_transform_matrix`](#function-set_transform_matrix)

<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_clip.rs#L74)

<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_clip.rs#L79)

<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_clip.rs#L88)

<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_clip.rs#L92)

<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_clip.rs#L97)

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

### anchor_point

```rust
fn anchor_point(self: &Self) -> Vector
```

The point of the clip, relative to the size of the visual, that is
placed at `offset`.

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

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

### set_anchor_point

```rust
fn set_anchor_point(self: &Self, value: Vector)
```



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

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

### center_point

```rust
fn center_point(self: &Self) -> Vector
```

The point the clip is scaled and rotated about.

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

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

### set_center_point

```rust
fn set_center_point(self: &Self, value: Vector)
```



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

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

### offset

```rust
fn offset(self: &Self) -> Vector
```

The offset of the clip.

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

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

### set_offset

```rust
fn set_offset(self: &Self, value: Vector)
```



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

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

### rotation_angle

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

The rotation of the clip about its center point, in radians.

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

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

### set_rotation_angle

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



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

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

### rotation_angle_in_degrees

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

The rotation of the clip in degrees: a view of
`rotation_angle`.

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

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

### set_rotation_angle_in_degrees

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



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

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

### scale

```rust
fn scale(self: &Self) -> Vector
```

The scale of the clip about its center point (default `(1, 1)`).

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

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

### set_scale

```rust
fn set_scale(self: &Self, value: Vector)
```



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

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

### transform_matrix

```rust
fn transform_matrix(self: &Self) -> Matrix
```

The transform matrix of the clip (WinUI `Matrix3x2`).

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

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

### set_transform_matrix

```rust
fn set_transform_matrix(self: &Self, value: Matrix)
```



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

## 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`
- `CompositionClipHooks`
- `InsetClipHooks`
- `RectangleClipHooks`
- `GeometricClipHooks`
- `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/).
