-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
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 theICompositionSurface. It mainly contains references to anICompositionGeneratorobject and anICompositionSurfaceobject which are the core objects required for rendering any geometry or image onto aICompositionSurface.IMaskSurface- This interface is used for rendering custom shaped geometries ontoICompositionSurfaceso that they can be useds as masks on Composition Visuals.IGaussianMaskSurface- This interface derives fromIMaskSurfaceand is used for rendering custom shaped geometries ontoICompositionSurfaceso 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 ontoICompositionSurface.IImageSurface- This interface is used for rendering images ontoICompositionSurface.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.



