PositiveEffect
Looks at the picture through a coloured filter: each colour channel is multiplied by the matching
channel of ColorFilter.
public class PositiveEffect : ShaderEffect
Inherits from / implements: ShaderEffect
Remarks
White, the default, changes nothing; a pale amber warms the picture, and pure red keeps only
its red channel. A filter can only take colour away, never add it – to tint towards a colour, see
ColorBlendEffect.
Settings
| Property | Range and default |
|---|---|
The filter colour; its alpha is not used. Default white. |
Examples
<Image Source="Photos/harbour.jpg"
xmlns:fx="clr-namespace:Binarymission.WPF.Shaders.Library.CustomEffects;assembly=Binarymission.WPF.Shaders.Library">
<Image.Effect>
<fx:PositiveEffect ColorFilter="#FFFFE2B8" />
</Image.Effect>
</Image>See also
Members at a glance
| Constructors | |
|---|---|
PositiveEffect | Creates the effect with its default settings: ColorFilter white, which changes
nothing. |
| Properties | |
ColorFilter | Gets or sets the colour of the filter the picture is seen through. |
Input | Gets or sets the picture the effect works on. |
| Fields | |
ColorFilterProperty | Identifies the ColorFilter dependency property. |
InputProperty | Identifies the Input dependency property. |
Constructors
PositiveEffect
Creates the effect with its default settings: ColorFilter white, which changes
nothing.
Properties
ColorFilter
Gets or sets the colour of the filter the picture is seen through.
- Value
- Each channel of the picture is multiplied by the matching channel of this colour; its alpha
is not used. The default is
Colors.White, which 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.
Fields
ColorFilterProperty static
Identifies the ColorFilter dependency property.
InputProperty static
Identifies the Input dependency property.