Layers - Finished effects on layers, groups still missing

Effects - Added filter effect with different SkiaSharp image filters
This commit is contained in:
SpoinkyNL committed 2020-06-16 00:25:04 +02:00
1 parent 58a964b872
commit a62d5544cf
18 files changed
+264 -55

No files matched your search

@@ -12,6 +12,11 @@ namespace Artemis.Core.Plugins.LayerEffect.Abstract
/// </summary>
public abstract class BaseLayerEffect : PropertyChangedBase, IDisposable
{
/// <summary>
/// Gets the unique ID of this effect
/// </summary>
public Guid EntityId { get; internal set; }
/// <summary>
/// Gets the layer this effect is applied to
/// </summary>
@@ -36,7 +41,7 @@ namespace Artemis.Core.Plugins.LayerEffect.Abstract
/// <summary>
/// Gets the order in which this effect appears in the update loop and editor
/// </summary>
public int Order { get; internal set; }
public int Order { get; set; }
/// <summary>
/// Gets the descriptor of this effect
@@ -53,7 +58,7 @@ namespace Artemis.Core.Plugins.LayerEffect.Abstract
/// </summary>
public virtual LayerPropertyGroup BaseProperties => null;
internal string PropertyRootPath => $"LayerEffect.{Order}.{GetType().Name}.";
internal string PropertyRootPath => $"LayerEffect.{EntityId}.{GetType().Name}.";
public void Dispose()
{
@@ -85,17 +90,7 @@ namespace Artemis.Core.Plugins.LayerEffect.Abstract
/// Called after the layer of folder has been rendered
/// </summary>
public abstract void PostProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath path, SKPaint paint);
public void UpdateOrder(int newOrder)
{
if (newOrder == Order)
return;
var oldOrder = Order;
Order = newOrder;
BaseProperties.UpdateOrder(oldOrder);
}
internal void InternalPreProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath path, SKPaint paint)
{
// Move the canvas to the top-left of the render path