mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-03-24 02:08:47 +00:00
Filter effects - Moved all to post processing
This commit is contained in:
parent
ab449e5786
commit
63cb6d211e
@ -6,9 +6,9 @@ namespace Artemis.Plugins.LayerEffects.Filter
|
||||
{
|
||||
public class BlurEffect : LayerEffect<BlurEffectProperties>
|
||||
{
|
||||
private double _lastWidth;
|
||||
private double _lastHeight;
|
||||
private SKImageFilter _imageFilter;
|
||||
private double _lastHeight;
|
||||
private double _lastWidth;
|
||||
|
||||
public override void EnableLayerEffect()
|
||||
{
|
||||
@ -39,7 +39,6 @@ namespace Artemis.Plugins.LayerEffects.Filter
|
||||
|
||||
public override void PreProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath renderBounds, SKPaint paint)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void PostProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath renderBounds, SKPaint paint)
|
||||
|
||||
@ -19,9 +19,6 @@ namespace Artemis.Plugins.LayerEffects.Filter
|
||||
|
||||
public override void PreProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath renderBounds, SKPaint paint)
|
||||
{
|
||||
var visualizationPath = new SKPath();
|
||||
visualizationPath.AddOval(SKRect.Create(0, 0, renderBounds.Bounds.Width / 2, renderBounds.Bounds.Height / 2));
|
||||
canvas.ClipPath(visualizationPath);
|
||||
}
|
||||
|
||||
public override void PostProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath renderBounds, SKPaint paint)
|
||||
|
||||
@ -18,6 +18,10 @@ namespace Artemis.Plugins.LayerEffects.Filter
|
||||
}
|
||||
|
||||
public override void PreProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath renderBounds, SKPaint paint)
|
||||
{
|
||||
}
|
||||
|
||||
public override void PostProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath renderBounds, SKPaint paint)
|
||||
{
|
||||
paint.ImageFilter = SKImageFilter.CreateErode(
|
||||
(int) Properties.ErodeRadius.CurrentValue.Width,
|
||||
@ -25,9 +29,5 @@ namespace Artemis.Plugins.LayerEffects.Filter
|
||||
paint.ImageFilter
|
||||
);
|
||||
}
|
||||
|
||||
public override void PostProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath renderBounds, SKPaint paint)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,6 @@
|
||||
using Artemis.Core.Models.Profile;
|
||||
using Artemis.Core.Models.Profile.LayerProperties.Attributes;
|
||||
using Artemis.Core.Models.Profile.LayerProperties.Types;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Artemis.Plugins.LayerEffects.Filter
|
||||
{
|
||||
|
||||
@ -19,7 +19,6 @@ namespace Artemis.Plugins.LayerEffects.Filter
|
||||
|
||||
public override void PreProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath renderBounds, SKPaint paint)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void PostProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath renderBounds, SKPaint paint)
|
||||
|
||||
@ -18,6 +18,10 @@ namespace Artemis.Plugins.LayerEffects.Filter
|
||||
}
|
||||
|
||||
public override void PreProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath renderBounds, SKPaint paint)
|
||||
{
|
||||
}
|
||||
|
||||
public override void PostProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath renderBounds, SKPaint paint)
|
||||
{
|
||||
paint.ImageFilter = SKImageFilter.CreateColorFilter(SKColorFilter.CreateColorMatrix(new[]
|
||||
{
|
||||
@ -27,9 +31,5 @@ namespace Artemis.Plugins.LayerEffects.Filter
|
||||
0, 0, 0, 1, 0
|
||||
}), paint.ImageFilter);
|
||||
}
|
||||
|
||||
public override void PostProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath renderBounds, SKPaint paint)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user