Class CrossFadeEffect
- Namespace
- PaintDotNet.Direct2D1.Effects
- Assembly
- PaintDotNet.Windows.Core.dll
This effect combines two images by adding weighted pixels from the input images.
It has two inputs, named Destination and Source.
The cross fade formula is:
Output = SourceWeight * Source + (1 - SourceWeight) * Destination
For more information, see Cross-fade effect.
Please note that Direct2D's Weight property is reversed from what is implemented here; put another way, the inputs have been renamed from Destination and Source to Source and Destination. This results in a more natural mapping for the SourceWeight property.
You can use the Direct2D meanings for the inputs and properties by creating the effect manually with IDeviceContext.CreateEffect(DeviceEffectIDs.CrossFade), and then using SetValue(CrossFadeProperty.Weight) to set the Weight property.
public sealed class CrossFadeEffect : CustomEffect<CrossFadeEffect.Props>, ISerializable, IDeviceEffect, IDeviceImage, IDirect2DResource, IFactoryProperty, IDeviceEffectProperties, IObjectRef, IIsDisposed, IDisposable, IInternalImpl
- Inheritance
-
CrossFadeEffect
- Implements
- Inherited Members
- Extension Methods