Changed color to be an immutable value-type

This commit is contained in:
DarthAffe committed 2017-12-04 10:13:58 +01:00
1 parent b9e443b3b6
commit 50cfd296be
16 files changed
+1014 -410

No files matched your search

+3 -12
View File
@@ -37,10 +37,7 @@ namespace RGB.NET.Brushes
#region Methods
/// <inheritdoc />
protected override Color GetColorAtPoint(Rectangle rectangle, BrushRenderTarget renderTarget)
{
return Color;
}
protected override Color GetColorAtPoint(Rectangle rectangle, BrushRenderTarget renderTarget) => Color;
#endregion
@@ -50,19 +47,13 @@ namespace RGB.NET.Brushes
/// Converts a <see cref="Color" /> to a <see cref="SolidColorBrush" />.
/// </summary>
/// <param name="color">The <see cref="Color"/> to convert.</param>
public static explicit operator SolidColorBrush(Color color)
{
return new SolidColorBrush(color);
}
public static explicit operator SolidColorBrush(Color color) => new SolidColorBrush(color);
/// <summary>
/// Converts a <see cref="SolidColorBrush" /> to a <see cref="Color" />.
/// </summary>
/// <param name="brush">The <see cref="Color"/> to convert.</param>
public static implicit operator Color(SolidColorBrush brush)
{
return brush.Color;
}
public static implicit operator Color(SolidColorBrush brush) => brush.Color;
#endregion
}