TwirlEffect
Twists the middle of the picture round its centre, most at the centre and easing to nothing at the edge of a circle.
public class TwirlEffect : ShaderEffect
Inherits from / implements: ShaderEffect
Remarks
Pixels outside Radius are left alone. The twist is always centred on the middle
of the element. Animate Angle from 0 for a swirl-in transition.
Settings
| Property | Range and default |
|---|---|
Size of the twisted circle, as a fraction of the element. Default 0.5; must be above 0. | |
Turn at the centre, in radians; negative twists the other way. Default 1.5. |
Examples
<Image Source="Photos/harbour.jpg"
xmlns:fx="clr-namespace:Binarymission.WPF.Shaders.Library.CustomEffects;assembly=Binarymission.WPF.Shaders.Library">
<Image.Effect>
<fx:TwirlEffect Radius="0.4" Angle="3" />
</Image.Effect>
</Image>See also
Members at a glance
| Constructors | |
|---|---|
TwirlEffect | Creates the effect with its default settings: Radius 0.5, Angle 1.5. |
| Properties | |
Angle | Gets or sets how far the twist turns. |
Input | Gets or sets the picture the effect works on. |
Radius | Gets or sets how much of the picture is caught up in the twist. |
| Fields | |
AngleProperty | Identifies the Angle dependency property. |
InputProperty | Identifies the Input dependency property. |
RadiusProperty | Identifies the Radius dependency property. |
Constructors
TwirlEffect
Properties
Angle
Gets or sets how far the twist turns.
- Value
- In radians at the centre, easing to nothing at
Radius; the default is 1.5. A negative value twists the other way, and 0 leaves the picture unchanged.
Input
Gets or sets the picture the effect works on.
- Value
- A brush. The default is the element the effect is applied to, as WPF renders it – the effect's implicit input.
Remarks
Leave it unset in the usual case, where the effect is set as an element's
Effect. Set it to a
ImageBrush or VisualBrush to
have the effect work on that picture instead.
Radius
Gets or sets how much of the picture is caught up in the twist.
- Value
- The radius of the twisted circle round the middle of the element, as a fraction of its size; the default is 0.5. It must be greater than 0.
Fields
AngleProperty static
Identifies the Angle dependency property.
InputProperty static
Identifies the Input dependency property.
RadiusProperty static
Identifies the Radius dependency property.