ArithmeticCompositeEffect Class |
Namespace: Microsoft.Graphics.Canvas.Effects
public sealed class ArithmeticCompositeEffect : ICanvasEffect, IGraphicsEffect, IGraphicsEffectSource, ICanvasImage, IDisposable
The ArithmeticCompositeEffect type exposes the following members.
Name | Description | |
---|---|---|
ArithmeticCompositeEffect | Initializes a new instance of the ArithmeticCompositeEffect class. |
Name | Description | |
---|---|---|
BufferPrecision | Specifies what precision to use for intermediate buffers when drawing this effect. | |
CacheOutput | Enables caching the output from drawing this effect. | |
ClampOutput | If set, the effect clamps color values to between 0 and 1 before passing
them on to the next effect in the graph. If false, the effect will not clamp
values, although subsequent effects or the output surface may later clamp if
they are not of high enough precision. Default value false. | |
MultiplyAmount | Weights how much the multiplication result (Source1 * Source2)
should be included in the output image. Default value 1. | |
Name | Attaches a user-defined name string to the effect. | |
Offset | Adds a constant offset to the output image. Default value 0. | |
Source1 | Gets or sets the first input source for ArithmeticComposite effect. | |
Source1Amount | Weights how much the first image (Source1) should be included in
the output image. Default value 0. | |
Source2 | Gets or sets the second input source for ArithmeticComposite effect. | |
Source2Amount | Weights how much the second image (Source2) should be included in
the output image. Default value 0. |
Name | Description | |
---|---|---|
Dispose | Releases all resources used by the effect. | |
GetBounds(ICanvasResourceCreator) | Retrieves the bounds of this ArithmeticCompositeEffect. | |
GetBounds(ICanvasResourceCreator, Matrix3x2) | Retrieves the bounds of this ArithmeticCompositeEffect. | |
GetInvalidRectangles | Queries what regions of the effect output have changed since it was last drawn. | |
GetRequiredSourceRectangle | Queries what part of an effect source image is needed to draw an output region. | |
GetRequiredSourceRectangles | Queries what parts of the effect source images are needed to draw an output region. | |
InvalidateSourceRectangle | Notifies the effect that one of its source images has changed. |
This effect combines two images using a weighted sum:
result = (Source1 * Source1Amount) + (Source2 * Source2Amount) + (Source1 * Source2 * MultiplyAmount) + Offset
Different settings of these coefficients can blend the images in many different ways, for instance:
This Windows Runtime type corresponds to the D2D Arithmetic composite effect.