Layer effects - WIP commit

Profile editor - Show brush icons at different parts in the editor
This commit is contained in:
SpoinkyNL committed 2020-06-10 00:20:43 +02:00
1 parent ac23d89f3e
commit f178c3d790
28 files changed
+618 -63

No files matched your search

@@ -0,0 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<ShouldIncludeNativeSkiaSharp>false</ShouldIncludeNativeSkiaSharp>
<AssemblyTitle>Artemis.Plugins.LayerEffects.Filter</AssemblyTitle>
<Product>Artemis.Plugins.LayerEffects.Filter</Product>
<Copyright>Copyright © 2019</Copyright>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<UseWPF>true</UseWPF>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugType>full</DebugType>
<LangVersion>7</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DebugType>pdbonly</DebugType>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<ItemGroup>
<None Include="plugin.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="SkiaSharp" Version="1.68.3" />
<PackageReference Include="Stylet" Version="1.3.2" />
<PackageReference Include="System.Buffers" Version="4.5.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Artemis.Core\Artemis.Core.csproj">
<Private>false</Private>
</ProjectReference>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(BuildingInsideVisualStudio)' == 'true'">
<Exec Command="echo Copying resources to plugin output directory&#xD;&#xA;XCOPY &quot;$(ProjectDir)Images&quot; &quot;$(TargetDir)Images&quot; /s /q /i /y&#xD;&#xA;XCOPY &quot;$(ProjectDir)Layouts&quot; &quot;$(TargetDir)Layouts&quot; /s /q /i /y&#xD;&#xA;echo Copying plugin to Artemis.UI output directory&#xD;&#xA;XCOPY &quot;$(TargetDir.TrimEnd('\'))&quot; &quot;$(SolutionDir)\Artemis.UI\$(OutDir)Plugins\$(ProjectName)&quot; /s /q /i /y" />
</Target>
</Project>
@@ -0,0 +1,29 @@
using Artemis.Core.Plugins.LayerEffect.Abstract;
using SkiaSharp;
namespace Artemis.Plugins.LayerEffects.Filter
{
public class FilterEffect : LayerEffect<FilterEffectProperties>
{
public override void EnableLayerEffect()
{
}
public override void DisableLayerEffect()
{
}
public override void Update(double deltaTime)
{
}
public override void PreProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath path, SKPaint paint)
{
paint.ImageFilter = SKImageFilter.CreateBlur(Properties.BlurAmount.CurrentValue.Width, Properties.BlurAmount.CurrentValue.Height, paint.ImageFilter);
}
public override void PostProcess(SKCanvas canvas, SKImageInfo canvasInfo, SKPath path, SKPaint paint)
{
}
}
}
@@ -0,0 +1,20 @@
using Artemis.Core.Models.Profile;
using Artemis.Core.Models.Profile.LayerProperties.Attributes;
using Artemis.Core.Models.Profile.LayerProperties.Types;
namespace Artemis.Plugins.LayerEffects.Filter
{
public class FilterEffectProperties : LayerPropertyGroup
{
[PropertyDescription(Description = "The amount of blur to apply")]
public SKSizeLayerProperty BlurAmount { get; set; }
protected override void PopulateDefaults()
{
}
protected override void OnPropertiesInitialized()
{
}
}
}
@@ -0,0 +1,16 @@
using Artemis.Core.Plugins.Abstract;
namespace Artemis.Plugins.LayerEffects.Filter
{
public class FilterEffectProvider : LayerEffectProvider
{
public override void EnablePlugin()
{
AddLayerEffectDescriptor<FilterEffect>("Filter", "A layer effect providing different types of filters", "ImageFilterFrames");
}
public override void DisablePlugin()
{
}
}
}
@@ -0,0 +1,7 @@
{
"Guid": "fca5b5d6-3f86-4ea7-a271-06ec3fc219e2",
"Name": "Filter layer effect",
"Description": "A layer effect providing different types of filters.",
"Version": "1.0.0.0",
"Main": "Artemis.Plugins.LayerEffects.Filter.dll"
}