Compositor.CreateEffectFactory Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateEffectFactory(IGraphicsEffect) |
Creates an instance of CompositionEffectFactory. |
CreateEffectFactory(IGraphicsEffect, IIterable<String>) |
Creates an instance of CompositionEffectFactory specifying effect parameters that should be animatable. |
CreateEffectFactory(IGraphicsEffect)
Creates an instance of CompositionEffectFactory.
public:
virtual CompositionEffectFactory ^ CreateEffectFactory(IGraphicsEffect ^ graphicsEffect) = CreateEffectFactory;
/// [Windows.Foundation.Metadata.Overload("CreateEffectFactory")]
CompositionEffectFactory CreateEffectFactory(IGraphicsEffect const& graphicsEffect);
[Windows.Foundation.Metadata.Overload("CreateEffectFactory")]
public CompositionEffectFactory CreateEffectFactory(IGraphicsEffect graphicsEffect);
function createEffectFactory(graphicsEffect)
Public Function CreateEffectFactory (graphicsEffect As IGraphicsEffect) As CompositionEffectFactory
Parameters
- graphicsEffect
- IGraphicsEffect
The type of effect to create.
Returns
Returns the created CompositionEffectFactory object.
- Attributes
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 Name | Description |
---|---|
ArithmeticCompositeEffect | Combines two images using a weighted sum of pixels from the source images. |
CompositeEffect | 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 (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 | 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 | 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 | 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
Applies to
CreateEffectFactory(IGraphicsEffect, IIterable<String>)
Creates an instance of CompositionEffectFactory specifying effect parameters that should be animatable.
public:
virtual CompositionEffectFactory ^ CreateEffectFactory(IGraphicsEffect ^ graphicsEffect, IIterable<Platform::String ^> ^ animatableProperties) = CreateEffectFactory;
/// [Windows.Foundation.Metadata.Overload("CreateEffectFactoryWithProperties")]
CompositionEffectFactory CreateEffectFactory(IGraphicsEffect const& graphicsEffect, IIterable<winrt::hstring> const& animatableProperties);
[Windows.Foundation.Metadata.Overload("CreateEffectFactoryWithProperties")]
public CompositionEffectFactory CreateEffectFactory(IGraphicsEffect graphicsEffect, IEnumerable<string> animatableProperties);
function createEffectFactory(graphicsEffect, animatableProperties)
Public Function CreateEffectFactory (graphicsEffect As IGraphicsEffect, animatableProperties As IEnumerable(Of String)) As CompositionEffectFactory
Parameters
- graphicsEffect
- IGraphicsEffect
The type of effect to create.
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
Returns the created CompositionEffectFactory object.
- Attributes