add Gooey Effect Demo

This commit is contained in:
NaBian committed 2020-02-20 22:46:34 +08:00
1 parent a943927a24
commit cd3072f026
22 files changed
+571 -40

No files matched your search

@@ -1,15 +1,12 @@
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Effects;
using HandyControl.Data;
namespace HandyControl.Media.Effects
{
public class GrayScaleEffect : ShaderEffect
public class GrayScaleEffect : EffectBase
{
public static readonly DependencyProperty InputProperty = RegisterPixelShaderSamplerProperty("Input", typeof(GrayScaleEffect), 0);
private static readonly PixelShader Shader;
static GrayScaleEffect()
@@ -28,12 +25,6 @@ namespace HandyControl.Media.Effects
UpdateShaderValue(ScaleProperty);
}
public Brush Input
{
get => (Brush)GetValue(InputProperty);
set => SetValue(InputProperty, value);
}
public static readonly DependencyProperty ScaleProperty = DependencyProperty.Register(
"Scale", typeof(double), typeof(GrayScaleEffect), new PropertyMetadata(ValueBoxes.Double1Box, PixelShaderConstantCallback(0)));