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

@@ -17,6 +17,12 @@ namespace Artemis.Core.Services.Interfaces
/// <returns></returns>
Layer CreateLayer(Profile profile, ProfileElement parent, string name);
/// <summary>
/// Removes the currently active layer brush from the <see cref="Layer" /> and deletes any settings
/// </summary>
/// <param name="layer">The layer to remove the active brush from</param>
void RemoveLayerBrush(Layer layer);
/// <summary>
/// Instantiates and adds the <see cref="BaseLayerBrush" /> described by the provided
/// <see cref="LayerBrushDescriptor" />
+11 -2
View File
@@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using Artemis.Core.Exceptions;
using Artemis.Core.Models.Profile;
using Artemis.Core.Plugins.Abstract;
@@ -40,6 +41,12 @@ namespace Artemis.Core.Services
return layer;
}
public void RemoveLayerBrush(Layer layer)
{
layer.RemoveLayerBrush();
layer.OnLayerBrushUpdated();
}
public BaseLayerBrush InstantiateLayerBrush(Layer layer)
{
if (layer.LayerBrush != null)
@@ -87,6 +94,7 @@ namespace Artemis.Core.Services
continue;
var effect = (BaseLayerEffect) _kernel.Get(descriptor.LayerEffectType);
effect.EntityId = layerEntityLayerEffect.Id;
effect.Layer = layer;
effect.Order = layerEntityLayerEffect.Order;
effect.Name = layerEntityLayerEffect.Name;
@@ -104,6 +112,7 @@ namespace Artemis.Core.Services
public BaseLayerEffect AddLayerEffect(Layer layer, LayerEffectDescriptor layerEffectDescriptor)
{
var effect = (BaseLayerEffect) _kernel.Get(layerEffectDescriptor.LayerEffectType);
effect.EntityId = Guid.NewGuid();
effect.Layer = layer;
effect.Order = layer.LayerEffects.Count + 1;
effect.Descriptor = layerEffectDescriptor;
@@ -113,7 +122,7 @@ namespace Artemis.Core.Services
layer.AddLayerEffect(effect);
_logger.Debug("Added layer effect with root path {rootPath}", effect.PropertyRootPath);
layer.OnLayerEffectsUpdated();
return effect;
}