add ColorComplementEffect
This commit is contained in:
1 parent
94a1dbee42
commit
f1dca283f8
7 files changed
+45
No files matched your search
@@ -58,6 +58,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Media\Animation\LinearGeometryKeyFrame.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Media\Animation\ResolvedKeyFrameEntry.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Media\Animation\SplineGeometryKeyFrame.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Media\Effects\ColorComplementEffect.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\BorderCircularClipConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\ColLayoutConverter.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\CornerRadiusSplitConverter.cs" />
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Expression.Shapes")]
|
||||
[assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Expression.Media")]
|
||||
[assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Media.Animation")]
|
||||
[assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Media.Effects")]
|
||||
[assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Data")]
|
||||
[assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Properties.Langs")]
|
||||
[assembly: XmlnsPrefix("https://handyorg.github.io/handycontrol", "hc")]
|
||||
Binary file not shown.
Reference in new issue
Block a user