add ColorComplementEffect
This commit is contained in:
1 parent
94a1dbee42
commit
f1dca283f8
7 files changed
+45
No files matched your search
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Effects;
|
||||
|
||||
namespace HandyControl.Media.Effects
|
||||
{
|
||||
public class ColorComplementEffect : ShaderEffect
|
||||
{
|
||||
public static readonly DependencyProperty InputProperty = RegisterPixelShaderSamplerProperty("Input", typeof(ColorComplementEffect), 0);
|
||||
|
||||
private static readonly PixelShader Shader;
|
||||
|
||||
static ColorComplementEffect()
|
||||
{
|
||||
Shader = new PixelShader
|
||||
{
|
||||
UriSource = new Uri("pack://application:,,,/HandyControl;component/Resources/Effects/ColorComplementEffect.ps")
|
||||
};
|
||||
}
|
||||
|
||||
public ColorComplementEffect()
|
||||
{
|
||||
PixelShader = Shader;
|
||||
UpdateShaderValue(InputProperty);
|
||||
}
|
||||
|
||||
public Brush Input
|
||||
{
|
||||
get => (Brush)GetValue(InputProperty);
|
||||
set => SetValue(InputProperty, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user