Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 1.88 KB

compositioneffectfactory.md

File metadata and controls

45 lines (29 loc) · 1.88 KB
-api-id -api-type
T:Microsoft.UI.Composition.CompositionEffectFactory
winrt class

Microsoft.UI.Composition.CompositionEffectFactory

-description

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.

-remarks

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.

-examples

// Create an effect description 
GaussianBlurEffect blurEffect = new GaussianBlurEffect() 
{ 
    Name = "Blur", 
    BlurAmount = 1.0f, 
    BorderMode = EffectBorderMode.Hard, 
    Optimization = EffectOptimization.Balanced 
}; 

CompositionEffectFactory blurEffectFactory = _compositor.CreateEffectFactory(blurEffect); 
         

-see-also

Composition Brushes Overview, Composition Effects Overview, CompositionObject, IClosable