mirror of
https://gitee.com/handyorg/HandyControl.git
synced 2024-11-30 10:57:51 +08:00
add ColorComplementEffect
This commit is contained in:
parent
94a1dbee42
commit
f1dca283f8
@ -56,5 +56,8 @@
|
||||
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\dropper.cur">
|
||||
<Link>Resources\dropper.cur</Link>
|
||||
</Resource>
|
||||
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Effects\ColorComplementEffect.ps">
|
||||
<Link>Resources\Effects\ColorComplementEffect.ps</Link>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -108,6 +108,9 @@
|
||||
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\dropper.cur">
|
||||
<Link>Resources\dropper.cur</Link>
|
||||
</Resource>
|
||||
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Effects\ColorComplementEffect.ps">
|
||||
<Link>Resources\Effects\ColorComplementEffect.ps</Link>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<Import Project="..\..\Shared\HandyControl_Shared\HandyControl_Shared.projitems" Label="Shared" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
@ -179,6 +179,9 @@
|
||||
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\dropper.cur">
|
||||
<Link>Resources\dropper.cur</Link>
|
||||
</Resource>
|
||||
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Effects\ColorComplementEffect.ps">
|
||||
<Link>Resources\Effects\ColorComplementEffect.ps</Link>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<Import Project="..\..\Shared\HandyControl_Shared\HandyControl_Shared.projitems" Label="Shared" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
@ -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.
Loading…
Reference in New Issue
Block a user