# Compositor

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

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

```rust
struct Compositor
```

The compositor: manages the composition objects of the UI thread and
commits their changes to the server compositor in batches.

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

## Members

- [`MAX_GLOBAL_PLAYBACK_RATE`](#assoc_const-max_global_playback_rate)
- [`MIN_GLOBAL_PLAYBACK_RATE`](#assoc_const-min_global_playback_rate)
- [`create_animation_controller`](#function-create_animation_controller)
- [`global_playback_rate`](#function-global_playback_rate)
- [`set_global_playback_rate`](#function-set_global_playback_rate)
- [`create_cubic_bezier_easing_function`](#function-create_cubic_bezier_easing_function)
- [`create_linear_easing_function`](#function-create_linear_easing_function)
- [`create_step_easing_function`](#function-create_step_easing_function)
- [`create_step_easing_function_with_step_count`](#function-create_step_easing_function_with_step_count)
- [`create_scalar_key_frame_animation`](#function-create_scalar_key_frame_animation)
- [`create_double_key_frame_animation`](#function-create_double_key_frame_animation)
- [`create_boolean_key_frame_animation`](#function-create_boolean_key_frame_animation)
- [`create_color_key_frame_animation`](#function-create_color_key_frame_animation)
- [`create_vector_key_frame_animation`](#function-create_vector_key_frame_animation)
- [`create_vector2_key_frame_animation`](#function-create_vector2_key_frame_animation)
- [`create_vector3_key_frame_animation`](#function-create_vector3_key_frame_animation)
- [`create_vector3d_key_frame_animation`](#function-create_vector3d_key_frame_animation)
- [`create_vector4_key_frame_animation`](#function-create_vector4_key_frame_animation)
- [`create_quaternion_key_frame_animation`](#function-create_quaternion_key_frame_animation)
- [`create_relative_point_key_frame_animation`](#function-create_relative_point_key_frame_animation)
- [`create_relative_scalar_key_frame_animation`](#function-create_relative_scalar_key_frame_animation)
- [`create_spring_scalar_animation`](#function-create_spring_scalar_animation)
- [`create_spring_vector2_animation`](#function-create_spring_vector2_animation)
- [`create_spring_vector3_animation`](#function-create_spring_vector3_animation)
- [`create_effect_factory`](#function-create_effect_factory)
- [`create_effect_factory_with_properties`](#function-create_effect_factory_with_properties)
- [`create_backdrop_brush`](#function-create_backdrop_brush)
- [`create_host_backdrop_brush`](#function-create_host_backdrop_brush)
- [`create_scoped_batch`](#function-create_scoped_batch)
- [`create_property_set`](#function-create_property_set)
- [`create_ambient_light`](#function-create_ambient_light)
- [`create_distant_light`](#function-create_distant_light)
- [`create_point_light`](#function-create_point_light)
- [`create_spot_light`](#function-create_spot_light)
- [`create_shape_visual`](#function-create_shape_visual)
- [`create_sprite_shape`](#function-create_sprite_shape)
- [`create_sprite_shape_with_geometry`](#function-create_sprite_shape_with_geometry)
- [`create_container_shape`](#function-create_container_shape)
- [`create_rectangle_geometry`](#function-create_rectangle_geometry)
- [`create_rounded_rectangle_geometry`](#function-create_rounded_rectangle_geometry)
- [`create_ellipse_geometry`](#function-create_ellipse_geometry)
- [`create_line_geometry`](#function-create_line_geometry)
- [`create_path_geometry`](#function-create_path_geometry)
- [`create_path_geometry_with_path`](#function-create_path_geometry_with_path)
- [`create_view_box`](#function-create_view_box)
- [`create_geometric_clip`](#function-create_geometric_clip)
- [`create_geometric_clip_with_geometry`](#function-create_geometric_clip_with_geometry)
- [`create_sprite_visual`](#function-create_sprite_visual)
- [`create_color_brush`](#function-create_color_brush)
- [`create_color_brush_with_color`](#function-create_color_brush_with_color)
- [`create_surface_brush`](#function-create_surface_brush)
- [`create_surface_brush_with_surface`](#function-create_surface_brush_with_surface)
- [`create_visual_surface`](#function-create_visual_surface)
- [`create_drop_shadow`](#function-create_drop_shadow)
- [`create_inset_clip`](#function-create_inset_clip)
- [`create_inset_clip_with_insets`](#function-create_inset_clip_with_insets)
- [`create_rectangle_clip`](#function-create_rectangle_clip)
- [`create_rectangle_clip_with`](#function-create_rectangle_clip_with)
- [`create_rectangle_clip_with_radii`](#function-create_rectangle_clip_with_radii)
- [`create_layer_visual`](#function-create_layer_visual)
- [`create_redirect_visual`](#function-create_redirect_visual)
- [`create_redirect_visual_with_source_visual`](#function-create_redirect_visual_with_source_visual)
- [`create_nine_grid_brush`](#function-create_nine_grid_brush)
- [`create_mask_brush`](#function-create_mask_brush)
- [`create_color_gradient_stop`](#function-create_color_gradient_stop)
- [`create_color_gradient_stop_default`](#function-create_color_gradient_stop_default)
- [`create_container_visual`](#function-create_container_visual)
- [`create_expression_animation`](#function-create_expression_animation)
- [`create_expression_animation_with`](#function-create_expression_animation_with)
- [`create_implicit_animation_collection`](#function-create_implicit_animation_collection)
- [`create_animation_group`](#function-create_animation_group)
- [`create_solid_color_visual`](#function-create_solid_color_visual)
- [`create_custom_visual`](#function-create_custom_visual)
- [`create_drawing_surface`](#function-create_drawing_surface)
- [`create_surface_visual`](#function-create_surface_visual)
- [`create_solid_color_brush`](#function-create_solid_color_brush)
- [`create_solid_color_brush_with`](#function-create_solid_color_brush_with)
- [`create_linear_gradient_brush`](#function-create_linear_gradient_brush)
- [`create_conic_gradient_brush`](#function-create_conic_gradient_brush)
- [`create_radial_gradient_brush`](#function-create_radial_gradient_brush)
- [`create_gradient_stop_with`](#function-create_gradient_stop_with)
- [`create_gradient_stop`](#function-create_gradient_stop)
- [`use_ui_thread_for_synchronous_commits`](#function-use_ui_thread_for_synchronous_commits)
- [`render_on_this_thread`](#function-render_on_this_thread)
- [`renders_on_render_thread`](#function-renders_on_render_thread)
- [`is_confined_to_render_thread`](#function-is_confined_to_render_thread)
- [`dispatcher`](#function-dispatcher)
- [`clock_elapsed`](#function-clock_elapsed)
- [`after_commit`](#function-after_commit)
- [`request_composition_update`](#function-request_composition_update)
- [`try_get_default_compositor`](#function-try_get_default_compositor)

<a id="assoc_const-max_global_playback_rate"></a>

### MAX_GLOBAL_PLAYBACK_RATE

```rust
const MAX_GLOBAL_PLAYBACK_RATE: f32
```

The highest global playback rate (WinUI `MaxGlobalPlaybackRate`).

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

<a id="assoc_const-min_global_playback_rate"></a>

### MIN_GLOBAL_PLAYBACK_RATE

```rust
const MIN_GLOBAL_PLAYBACK_RATE: f32
```

The lowest global playback rate (WinUI `MinGlobalPlaybackRate`).

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

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

### create_animation_controller

```rust
fn create_animation_controller(self: &Self) -> Rc<AnimationController>
```

Creates an animation controller (WinUI `CreateAnimationController`).

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

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

### global_playback_rate

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

The rate at which the time of every animation of the compositor runs
(WinUI `GlobalPlaybackRate`): 1 by default, 0.5 for half speed.

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

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

### set_global_playback_rate

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

Sets the global playback rate, clamped to
`MIN_GLOBAL_PLAYBACK_RATE`..`MAX_GLOBAL_PLAYBACK_RATE`.
It applies from the next frame to running animations and to those
started later: their time from then on runs at the new rate.

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

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

### create_cubic_bezier_easing_function

```rust
fn create_cubic_bezier_easing_function(self: &Self, control_point1: Vector2, control_point2: Vector2) -> Rc<CubicBezierEasingFunction>
```

A cubic Bezier curve with the given control points (WinUI
`CreateCubicBezierEasingFunction`).

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

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

### create_linear_easing_function

```rust
fn create_linear_easing_function(self: &Self) -> Rc<LinearEasingFunction>
```

The linear curve (WinUI `CreateLinearEasingFunction`).

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

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

### create_step_easing_function

```rust
fn create_step_easing_function(self: &Self) -> Rc<StepEasingFunction>
```

A step function with one step (WinUI `CreateStepEasingFunction()`).

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

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

### create_step_easing_function_with_step_count

```rust
fn create_step_easing_function_with_step_count(self: &Self, step_count: i32) -> Rc<StepEasingFunction>
```

A step function with `step_count` steps (WinUI
`CreateStepEasingFunction(stepCount)`).

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

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

### create_scalar_key_frame_animation

```rust
fn create_scalar_key_frame_animation(self: &Self) -> Rc<ScalarKeyFrameAnimation>
```



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

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

### create_double_key_frame_animation

```rust
fn create_double_key_frame_animation(self: &Self) -> Rc<DoubleKeyFrameAnimation>
```



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

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

### create_boolean_key_frame_animation

```rust
fn create_boolean_key_frame_animation(self: &Self) -> Rc<BooleanKeyFrameAnimation>
```



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

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

### create_color_key_frame_animation

```rust
fn create_color_key_frame_animation(self: &Self) -> Rc<ColorKeyFrameAnimation>
```



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

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

### create_vector_key_frame_animation

```rust
fn create_vector_key_frame_animation(self: &Self) -> Rc<VectorKeyFrameAnimation>
```



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

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

### create_vector2_key_frame_animation

```rust
fn create_vector2_key_frame_animation(self: &Self) -> Rc<Vector2KeyFrameAnimation>
```



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

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

### create_vector3_key_frame_animation

```rust
fn create_vector3_key_frame_animation(self: &Self) -> Rc<Vector3KeyFrameAnimation>
```



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

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

### create_vector3d_key_frame_animation

```rust
fn create_vector3d_key_frame_animation(self: &Self) -> Rc<Vector3DKeyFrameAnimation>
```



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

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

### create_vector4_key_frame_animation

```rust
fn create_vector4_key_frame_animation(self: &Self) -> Rc<Vector4KeyFrameAnimation>
```



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

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

### create_quaternion_key_frame_animation

```rust
fn create_quaternion_key_frame_animation(self: &Self) -> Rc<QuaternionKeyFrameAnimation>
```



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

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

### create_relative_point_key_frame_animation

```rust
fn create_relative_point_key_frame_animation(self: &Self) -> Rc<RelativePointKeyFrameAnimation>
```



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

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

### create_relative_scalar_key_frame_animation

```rust
fn create_relative_scalar_key_frame_animation(self: &Self) -> Rc<RelativeScalarKeyFrameAnimation>
```



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

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

### create_spring_scalar_animation

```rust
fn create_spring_scalar_animation(self: &Self) -> Rc<SpringScalarNaturalMotionAnimation>
```

Creates a `SpringScalarNaturalMotionAnimation`.

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

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

### create_spring_vector2_animation

```rust
fn create_spring_vector2_animation(self: &Self) -> Rc<SpringVector2NaturalMotionAnimation>
```

Creates a `SpringVector2NaturalMotionAnimation`.

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

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

### create_spring_vector3_animation

```rust
fn create_spring_vector3_animation(self: &Self) -> Rc<SpringVector3NaturalMotionAnimation>
```

Creates a `SpringVector3NaturalMotionAnimation`.

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

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

### create_effect_factory

```rust
fn create_effect_factory(self: &Self, effect: impl Into<GraphicsEffect>) -> Rc<CompositionEffectFactory>
```

`CreateEffectFactory(graphicsEffect)`: a factory of brushes that draw
`effect`, without animatable properties.

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

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

### create_effect_factory_with_properties

```rust
fn create_effect_factory_with_properties(self: &Self, effect: impl Into<GraphicsEffect>, animatable_properties: &[&str]) -> Rc<CompositionEffectFactory>
```

`CreateEffectFactory(graphicsEffect, animatableProperties)`: a factory
of brushes that draw `effect`, whose properties named in
`animatable_properties` (`EffectName.PropertyName`, as
`Blur.BlurAmount`) can be changed and animated on the brushes.

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

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

### create_backdrop_brush

```rust
fn create_backdrop_brush(self: &Self) -> CompositionBackdropBrush
```

`CreateBackdropBrush`: a brush that shows what is behind the visual
that paints it: the compositor draws again what was drawn under the
visual (winui-materials.md, the backdrop).

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

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

### create_host_backdrop_brush

```rust
fn create_host_backdrop_brush(self: &Self) -> CompositionHostBackdropBrush
```

`CreateHostBackdropBrush`: a brush that shows what is behind the
window (see `CompositionHostBackdropBrush`).

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

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

### create_scoped_batch

```rust
fn create_scoped_batch(self: &Self, batch_type: CompositionBatchTypes) -> Rc<CompositionScopedBatch>
```

Creates a scoped batch that aggregates the animations of the given
types started from now on (WinUI `CreateScopedBatch`).

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

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

### create_property_set

```rust
fn create_property_set(self: &Self) -> Rc<CompositionPropertySet>
```

Creates a property set (WinUI `CreatePropertySet`).

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

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

### create_ambient_light

```rust
fn create_ambient_light(self: &Self) -> AmbientLight
```

`CreateAmbientLight`.

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

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

### create_distant_light

```rust
fn create_distant_light(self: &Self) -> DistantLight
```

`CreateDistantLight`.

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

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

### create_point_light

```rust
fn create_point_light(self: &Self) -> PointLight
```

`CreatePointLight`.

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

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

### create_spot_light

```rust
fn create_spot_light(self: &Self) -> SpotLight
```

`CreateSpotLight`.

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

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

### create_shape_visual

```rust
fn create_shape_visual(self: &Self) -> ShapeVisual
```

`CreateShapeVisual`: a visual that draws shapes.

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

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

### create_sprite_shape

```rust
fn create_sprite_shape(self: &Self) -> CompositionSpriteShape
```

`CreateSpriteShape`: a shape without a geometry.

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

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

### create_sprite_shape_with_geometry

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

`CreateSpriteShape(geometry)`: a shape that draws `geometry`.

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

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

### create_container_shape

```rust
fn create_container_shape(self: &Self) -> CompositionContainerShape
```

`CreateContainerShape`: a shape that groups shapes.

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

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

### create_rectangle_geometry

```rust
fn create_rectangle_geometry(self: &Self) -> CompositionRectangleGeometry
```

`CreateRectangleGeometry`: an empty rectangle at the origin.

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

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

### create_rounded_rectangle_geometry

```rust
fn create_rounded_rectangle_geometry(self: &Self) -> CompositionRoundedRectangleGeometry
```

`CreateRoundedRectangleGeometry`: an empty rounded rectangle at the
origin.

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

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

### create_ellipse_geometry

```rust
fn create_ellipse_geometry(self: &Self) -> CompositionEllipseGeometry
```

`CreateEllipseGeometry`: an ellipse with zero radii at the origin.

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

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

### create_line_geometry

```rust
fn create_line_geometry(self: &Self) -> CompositionLineGeometry
```

`CreateLineGeometry`: a line from the origin to the origin.

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

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

### create_path_geometry

```rust
fn create_path_geometry(self: &Self) -> CompositionPathGeometry
```

`CreatePathGeometry`: a geometry without a path.

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

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

### create_path_geometry_with_path

```rust
fn create_path_geometry_with_path(self: &Self, path: Option<CompositionPath>) -> CompositionPathGeometry
```

`CreatePathGeometry(path)`: a geometry that shows `path`.

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

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

### create_view_box

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

`CreateViewBox`: a view box with a zero size.

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

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

### create_geometric_clip

```rust
fn create_geometric_clip(self: &Self) -> GeometricClip
```

`CreateGeometricClip`: a clip without a geometry.

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

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

### create_geometric_clip_with_geometry

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

`CreateGeometricClip(geometry)`: a clip to the inside of `geometry`.

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

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

### create_sprite_visual

```rust
fn create_sprite_visual(self: &Self) -> SpriteVisual
```

`CreateSpriteVisual`: a visual that paints its size with a brush.

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

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

### create_color_brush

```rust
fn create_color_brush(self: &Self) -> CompositionSolidColorBrush
```

`CreateColorBrush`: the WinUI name of
`create_solid_color_brush`.

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

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

### create_color_brush_with_color

```rust
fn create_color_brush_with_color(self: &Self, color: Color) -> CompositionSolidColorBrush
```

`CreateColorBrush(color)`: the WinUI name of
`create_solid_color_brush_with`.

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

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

### create_surface_brush

```rust
fn create_surface_brush(self: &Self) -> CompositionSurfaceBrush
```

`CreateSurfaceBrush`: a brush that paints a surface, without a
surface.

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

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

### create_surface_brush_with_surface

```rust
fn create_surface_brush_with_surface(self: &Self, surface: Rc<dyn ICompositionSurface>) -> CompositionSurfaceBrush
```

`CreateSurfaceBrush(surface)`: a brush that paints `surface`.

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

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

### create_visual_surface

```rust
fn create_visual_surface(self: &Self) -> Rc<CompositionVisualSurface>
```

`CreateVisualSurface`: a live image of the subtree of a visual.

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

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

### create_drop_shadow

```rust
fn create_drop_shadow(self: &Self) -> Rc<DropShadow>
```

`CreateDropShadow`: a shadow for a sprite visual.

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

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

### create_inset_clip

```rust
fn create_inset_clip(self: &Self) -> InsetClip
```

`CreateInsetClip`: a clip with zero insets.

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

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

### create_inset_clip_with_insets

```rust
fn create_inset_clip_with_insets(self: &Self, left: f32, top: f32, right: f32, bottom: f32) -> InsetClip
```

`CreateInsetClip(leftInset, topInset, rightInset, bottomInset)`.

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

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

### create_rectangle_clip

```rust
fn create_rectangle_clip(self: &Self) -> RectangleClip
```

`CreateRectangleClip`: a clip whose edges are all zero (it leaves
nothing visible until its edges are set).

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

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

### create_rectangle_clip_with

```rust
fn create_rectangle_clip_with(self: &Self, left: f32, top: f32, right: f32, bottom: f32) -> RectangleClip
```

`CreateRectangleClip(left, top, right, bottom)`.

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

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

### create_rectangle_clip_with_radii

```rust
fn create_rectangle_clip_with_radii(self: &Self, left: f32, top: f32, right: f32, bottom: f32, top_left_radius: Vector, top_right_radius: Vector, bottom_right_radius: Vector, bottom_left_radius: Vector) -> RectangleClip
```

`CreateRectangleClip(left, top, right, bottom, topLeftRadius,
topRightRadius, bottomRightRadius, bottomLeftRadius)`.

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

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

### create_layer_visual

```rust
fn create_layer_visual(self: &Self) -> LayerVisual
```

`CreateLayerVisual`: a container visual whose children are composed
into one layer.

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

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

### create_redirect_visual

```rust
fn create_redirect_visual(self: &Self) -> RedirectVisual
```

`CreateRedirectVisual`: a visual that shows the subtree of another
visual, without a source.

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

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

### create_redirect_visual_with_source_visual

```rust
fn create_redirect_visual_with_source_visual(self: &Self, source: Option<Rc<CompositionVisual>>) -> RedirectVisual
```

`CreateRedirectVisual(source)`: a visual that shows the subtree of
`source`.

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

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

### create_nine_grid_brush

```rust
fn create_nine_grid_brush(self: &Self) -> CompositionNineGridBrush
```

`CreateNineGridBrush`: a brush that paints another brush as a
nine-grid.

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

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

### create_mask_brush

```rust
fn create_mask_brush(self: &Self) -> CompositionMaskBrush
```

`CreateMaskBrush`: a brush that paints a brush through the alpha of
another.

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

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

### create_color_gradient_stop

```rust
fn create_color_gradient_stop(self: &Self, offset: f32, color: Color) -> Rc<CompositionGradientStop>
```

`CreateColorGradientStop(offset, color)`: the WinUI name of
`create_gradient_stop_with`.

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

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

### create_color_gradient_stop_default

```rust
fn create_color_gradient_stop_default(self: &Self) -> Rc<CompositionGradientStop>
```

`CreateColorGradientStop()`: the WinUI name of
`create_gradient_stop`.

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

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

### create_container_visual

```rust
fn create_container_visual(self: &Self) -> Rc<CompositionContainerVisual>
```



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

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

### create_expression_animation

```rust
fn create_expression_animation(self: &Self) -> Rc<ExpressionAnimation>
```



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

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

### create_expression_animation_with

```rust
fn create_expression_animation_with(self: &Self, expression: &str) -> Rc<ExpressionAnimation>
```



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

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

### create_implicit_animation_collection

```rust
fn create_implicit_animation_collection(self: &Self) -> Rc<ImplicitAnimationCollection>
```



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

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

### create_animation_group

```rust
fn create_animation_group(self: &Self) -> Rc<CompositionAnimationGroup>
```



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

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

### create_solid_color_visual

```rust
fn create_solid_color_visual(self: &Self) -> CompositionSolidColorVisual
```



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

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

### create_custom_visual

```rust
fn create_custom_visual(self: &Self, handler: impl FnOnce() -> Rc<dyn ICompositionCustomVisualHandler> + Send + 'static) -> CompositionCustomVisual
```


The handler belongs to the render thread: `handler` creates it there.

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

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

### create_drawing_surface

```rust
fn create_drawing_surface(self: &Self) -> CompositionDrawingSurface
```



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

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

### create_surface_visual

```rust
fn create_surface_visual(self: &Self) -> CompositionSurfaceVisual
```



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

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

### create_solid_color_brush

```rust
fn create_solid_color_brush(self: &Self) -> CompositionSolidColorBrush
```



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

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

### create_solid_color_brush_with

```rust
fn create_solid_color_brush_with(self: &Self, color: Color) -> CompositionSolidColorBrush
```



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

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

### create_linear_gradient_brush

```rust
fn create_linear_gradient_brush(self: &Self) -> CompositionLinearGradientBrush
```



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

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

### create_conic_gradient_brush

```rust
fn create_conic_gradient_brush(self: &Self) -> CompositionConicGradientBrush
```



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

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

### create_radial_gradient_brush

```rust
fn create_radial_gradient_brush(self: &Self) -> CompositionRadialGradientBrush
```



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

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

### create_gradient_stop_with

```rust
fn create_gradient_stop_with(self: &Self, offset: f64, color: Color) -> Rc<CompositionGradientStop>
```



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

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

### create_gradient_stop

```rust
fn create_gradient_stop(self: &Self) -> Rc<CompositionGradientStop>
```



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

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

### use_ui_thread_for_synchronous_commits

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



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

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

### render_on_this_thread

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

Renders a frame on this thread, under the compositor lock: what the
synchronous points do (`Server.Render` upstream).
## Panics

When the compositor is confined to its render thread: this thread
waits for a frame there, it never renders one.

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

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

### renders_on_render_thread

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

Whether the thread that ticks the render loop renders the frames,
not the thread of this compositor.

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

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

### is_confined_to_render_thread

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

Whether the thread that ticks the render loop is the only one that
renders: the render-thread mode without
`use_ui_thread_for_synchronous_commits`, on a loop that runs in the
background (the condition under which the reference waits for the
render thread at the synchronous points).

The render targets, the graphics context and everything else that
belongs to the thread that draws are then created, used and dropped
by the render thread alone. This thread still enters the compositor
lock (`with_server`), for what does not render:
it commits batches, posts jobs and waits for them.

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

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

### dispatcher

```rust
fn dispatcher(self: &Self) -> &Arc<Dispatcher>
```

The dispatcher of the thread the compositor belongs to.

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

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

### clock_elapsed

```rust
fn clock_elapsed(self: &Self) -> Duration
```

The time elapsed on the compositor clock.

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

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

### after_commit

```rust
fn after_commit(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
```

Subscribes to the notification raised after each commit. Dropping the
returned guard removes the handler; `Subscription::detach` keeps it
for the life of the compositor.

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

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

### request_composition_update

```rust
fn request_composition_update(self: &Self, action: impl FnOnce() -> () + 'static)
```

Enqueues a callback to be run before the next commit.

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

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

### try_get_default_compositor

```rust
fn try_get_default_compositor() -> Option<Rc<Compositor>>
```

The compositor registered in the service locator, if any.

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

## 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`
- `Drop`

## Availability

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