Skip to content

[Feature] Integrate CompositionProToolkit Rendering Surfaces #3442

@ratishphilip

Description

@ratishphilip

Describe the problem this feature would solve

CompositionProToolkit library provides five types of rendering surface interfaces.

  • IRenderSurface - This interface acts as the base interface for interfaces which render to the ICompositionSurface. It mainly contains references to an ICompositionGenerator object and an ICompositionSurface object which are the core objects required for rendering any geometry or image onto a ICompositionSurface.
  • IMaskSurface - This interface is used for rendering custom shaped geometries onto ICompositionSurface so that they can be useds as masks on Composition Visuals.
  • IGaussianMaskSurface - This interface derives from IMaskSurface and is used for rendering custom shaped geometries onto ICompositionSurface so that they can be useds as masks on Composition Visuals. You can apply a Gaussian Blur to the mask.
  • IGeometrySurface - This interface is used for rendering custom shaped geometries onto ICompositionSurface.
  • IImageSurface - This interface is used for rendering images onto ICompositionSurface.
  • IImageMaskSurface - This interface is used for creating a mask using the alpha values of the image pixels.

Here is the interface hierarchy

These surfaces can then be used to create brushes which can be used for rendering custom shapes and images.

These surfaces can also be used for creating masks from geometric shapes or images.

Using Win2d, these surfaces can be updated at 60fps to create an animation.

This can also be used to create custom shaped backdrop brush too.

Describe the solution

I would like to port the above to WindowsCommunityToolkit. This would exist in the Microsoft.Toolkit.Uwp.UI.Media project under the Microsoft.Toolkit.Uwp.UI.Media.Surface namespace.

In addition to the render surfaces, there would be Brushes (deriving from XamlCompositionBrushBase) corresponding to each of the rendering surfaces, so that it would be easy to use them directly in XAML.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions