WPF › Shaders Library › TwirlEffect
TwirlEffect
class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Shaders.Library.CustomEffects
A pixel shader effect that twists its input around its center. The radius sets how much of the image is caught up in the twist and the angle sets how far it turns.
public class TwirlEffect : ShaderEffect
Inherits from / implements: ShaderEffect
Members at a glance
TwirlEffect | Initializes a new instance of the TwirlEffect class. |
Angle | How far the twist turns, in radians at the center, falling off towards the edge. |
Input | The image this effect is applied to. It is set for you when the effect is attached to an element; set it directly only when using the effect as a brush. |
Radius | How much of the image is caught up in the twist, as a fraction of its size. |
AngleProperty | Identifies the Angle dependency property. |
InputProperty | Identifies the Input dependency property. |
RadiusProperty | Identifies the Radius dependency property. |
Constructors
TwirlEffect
public TwirlEffect()
Initializes a new instance of the TwirlEffect class.
Properties
Angle
public double Angle
How far the twist turns, in radians at the center, falling off towards the edge.
Input
public Brush Input
The image this effect is applied to. It is set for you when the effect is attached to an element; set it directly only when using the effect as a brush.
Radius
public double Radius
How much of the image is caught up in the twist, as a fraction of its size.
Fields
AngleProperty
public static readonly DependencyProperty AngleProperty
Identifies the Angle dependency property.
InputProperty
public static readonly DependencyProperty InputProperty
Identifies the Input dependency property.
RadiusProperty
public static readonly DependencyProperty RadiusProperty
Identifies the Radius dependency property.