Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 4.08 KB

compositor_createeffectfactory_720924202.md

File metadata and controls

41 lines (30 loc) · 4.08 KB
-api-id -api-type
M:Microsoft.UI.Composition.Compositor.CreateEffectFactory(Windows.Graphics.Effects.IGraphicsEffect)
winrt method

Microsoft.UI.Composition.Compositor.CreateEffectFactory

-description

Creates an instance of CompositionEffectFactory.

-parameters

-param graphicsEffect

The type of effect to create.

-returns

Returns the created CompositionEffectFactory object.

-remarks

Creating an effect factory compiles an effect and allows instances of that effect to be created.

See the remarks section of CompositionEffectBrush for information on creating and using effects.

Currently supported effects types include:

Effect Name Description
ArithmeticCompositeEffect
WinAppSDK (WinUI 3)
UWP (WinUI 2)
Combines two images using a weighted sum of pixels from the source images.
CompositeEffect
WinAppSDK (WinUI 3)
UWP (WinUI 2)
Combines two or more images based on their alpha channel. This effect has 13 different composite modes. The composite effect accepts 2 or more inputs. When you specify 2 images, destination is the first input (index 0) and the source is the second input (index 1). If you specify more than 2 inputs the images are composited starting with the first input and the second and so on.
BlendEffect
WinAppSDK (WinUI 3)
UWP (WinUI 2) (21 of 26 modes)
Combines 2 images. This effect has 26 blend modes with 21 of the modes currently supported by the Compositon API. The 5 blend modes that are currently not implemented are dissolve, hue, saturation, color, and luminosity.
ColorSourceEffect
WinAppSDK (WinUI 3)
UWP (WinUI 2)
The color source effect generates a specified solid color. It is useful as a source to other effects, such as tinting an image using a blend with a color source.
SaturationEffect
WinAppSDK (WinUI 3)
UWP (WinUI 2)
Alters the saturation of an image. If you set it to 1 the output image is fully saturated. If you set it to 0 the output image is monochrome.
Transform2DEffect
WinAppSDK (WinUI 3)
UWP (WinUI 2)
The 2D affine transform effect applies a spatial transform to an image based on a 3X2 matrix. This effect can be used to rotate, scale, skew, or translate an image. Or, you can combine these operations. Affine transfers preserve parallel lines and the ratio of distances between any three points in an image.

-examples

-see-also

Win2D documentation for WinAppSDK (WinUI 3) and UWP (WinUI 2), CreateEffectFactory(IGraphicsEffect, IIterable(String))