Compositor.CreateEffectFactory Compositor.CreateEffectFactory Compositor.CreateEffectFactory Compositor.CreateEffectFactory Method

Definition

Overloads

CreateEffectFactory(IGraphicsEffect) CreateEffectFactory(IGraphicsEffect) CreateEffectFactory(IGraphicsEffect) CreateEffectFactory(IGraphicsEffect)

Creates an instance of CompositionEffectFactory.

CreateEffectFactory(IGraphicsEffect, IIterable<String>) CreateEffectFactory(IGraphicsEffect, IIterable<String>) CreateEffectFactory(IGraphicsEffect, IIterable<String>) CreateEffectFactory(IGraphicsEffect, IIterable<String>)

Creates an instance of CompositionEffectFactory specifying effect parameters that should be animatable.

CreateEffectFactory(IGraphicsEffect) CreateEffectFactory(IGraphicsEffect) CreateEffectFactory(IGraphicsEffect) CreateEffectFactory(IGraphicsEffect)

Creates an instance of CompositionEffectFactory.

public : CompositionEffectFactory CreateEffectFactory(IGraphicsEffect graphicsEffect)
CompositionEffectFactory CreateEffectFactory(IGraphicsEffect graphicsEffect) const;
public CompositionEffectFactory CreateEffectFactory(IGraphicsEffect graphicsEffect)
Public Function CreateEffectFactory(graphicsEffect As IGraphicsEffect) As CompositionEffectFactory

Parameters

graphicsEffect
IGraphicsEffect IGraphicsEffect

The type of effect to create.

Returns

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 are:

Effect NameDescription
[ArithmeticCompositeEffect](https://microsoft.github.io/Win2D/html/T_Microsoft_Graphics_Canvas_Effects_ArithmeticCompositeEffect.htm)Combines two images using a weighted sum of pixels from the source images.
[CompositeEffect](https://microsoft.github.io/Win2D/html/T_Microsoft_Graphics_Canvas_Effects_CompositeEffect.htm)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](https://microsoft.github.io/Win2D/html/T_Microsoft_Graphics_Canvas_Effects_BlendEffect.htm) (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](https://microsoft.github.io/Win2D/html/T_Microsoft_Graphics_Canvas_Effects_ColorSourceEffect.htm)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](https://microsoft.github.io/Win2D/html/T_Microsoft_Graphics_Canvas_Effects_SaturationEffect.htm)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](https://microsoft.github.io/Win2D/html/T_Microsoft_Graphics_Canvas_Effects_Transform2DEffect.htm)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.

See the Win2D namespace, Microsoft.Graphics.Canvas.Effects, for more information on the effect types.

See also

CreateEffectFactory(IGraphicsEffect, IIterable<String>) CreateEffectFactory(IGraphicsEffect, IIterable<String>) CreateEffectFactory(IGraphicsEffect, IIterable<String>) CreateEffectFactory(IGraphicsEffect, IIterable<String>)

Creates an instance of CompositionEffectFactory specifying effect parameters that should be animatable.

public : CompositionEffectFactory CreateEffectFactory(IGraphicsEffect graphicsEffect, IIterable<Platform::String> animatableProperties)
CompositionEffectFactory CreateEffectFactory(IGraphicsEffect graphicsEffect, IIterable<winrt::hstring> animatableProperties) const;
public CompositionEffectFactory CreateEffectFactory(IGraphicsEffect graphicsEffect, IEnumerable<String> animatableProperties)
Public Function CreateEffectFactory(graphicsEffect As IGraphicsEffect, animatableProperties As IEnumerable(Of String)) As CompositionEffectFactory

Parameters

graphicsEffect
IGraphicsEffect IGraphicsEffect

The type of effect to create.

animatableProperties
IEnumerable<String> IEnumerable<String>

The list of properties that should be animatable. Properties are specified using strings of the form 'EffectName.PropertyName', where 'EffectName' identifies a graphics effect object by its IGraphicsEffect.Name property and 'PropertyName' identifies a property of that object.

Returns

See also