-api-id | -api-type |
---|---|
T:Microsoft.UI.Composition.CompositionEffectFactory |
winrt class |
Creates a composition object that contains a Win2D effect description format in the Microsoft.Graphics.Canvas.Effects namespace (WinAppSDK (WinUI 3) / UWP (WinUI 2)).
Note
Effects that are not supported are marked as [NoComposition] in the Win2D API Reference for effects namespace.
A composition effect is a graph of operations that define how to produce graphical content based on composition surfaces; for example, the pixel content of images. Effects are applied to visuals in the tree and can reference existing surfaces.
See the remarks section of CompositionEffectBrush for information on creating and using effects.
// Create an effect description
GaussianBlurEffect blurEffect = new GaussianBlurEffect()
{
Name = "Blur",
BlurAmount = 1.0f,
BorderMode = EffectBorderMode.Hard,
Optimization = EffectOptimization.Balanced
};
CompositionEffectFactory blurEffectFactory = _compositor.CreateEffectFactory(blurEffect);
Composition Brushes Overview, Composition Effects Overview, CompositionObject, IClosable