Replaced effects with decorators.

Decorators should be way more flexible while beeing easy to use.
This commit is contained in:
DarthAffe committed 2017-09-05 13:44:23 +02:00
1 parent 1f3213fa73
commit 2086b3729d
38 files changed
+414 -552

No files matched your search

@@ -0,0 +1,11 @@
using RGB.NET.Brushes.Gradients;
using RGB.NET.Core;
namespace RGB.NET.Brushes
{
/// <summary>
/// Represents a basic decorator decorating a <see cref="IGradient"/>.
/// </summary>
public interface IGradientDecorator : IDecorator
{ }
}
@@ -11,7 +11,7 @@ namespace RGB.NET.Brushes.Gradients
/// <summary>
/// Represents a basic gradient.
/// </summary>
public abstract class AbstractGradient : IGradient
public abstract class AbstractGradient : AbstractDecoratable<IGradientDecorator>, IGradient
{
#region Properties & Fields
+1 -1
View File
@@ -5,7 +5,7 @@ namespace RGB.NET.Brushes.Gradients
/// <summary>
/// Represents a basic gradient.
/// </summary>
public interface IGradient
public interface IGradient : IDecoratable<IGradientDecorator>
{
/// <summary>
/// Gets the <see cref="Color"/> of the <see cref="IGradient"/> on the specified offset.
+1 -1
View File
@@ -9,7 +9,7 @@ namespace RGB.NET.Brushes.Gradients
/// Represents a rainbow gradient which circles through all colors of the HUE-color-space.<br />
/// See <see href="http://upload.wikimedia.org/wikipedia/commons/a/ad/HueScale.svg" /> as reference.
/// </summary>
public class RainbowGradient : IGradient
public class RainbowGradient : AbstractDecoratable<IGradientDecorator>, IGradient
{
#region Properties & Fields
+1
View File
@@ -53,6 +53,7 @@
<Compile Include="Gradients\AbstractGradient.cs" />
<Compile Include="Gradients\GradientStop.cs" />
<Compile Include="Gradients\IGradient.cs" />
<Compile Include="Decorators\IGradientDecorator.cs" />
<Compile Include="Gradients\LinearGradient.cs" />
<Compile Include="Gradients\RainbowGradient.cs" />
<Compile Include="Helper\GradientHelper.cs" />
@@ -1,2 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=brushes/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=brushes/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=decorators/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>