mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-10 20:46:24 +00:00
Changed color to be an immutable value-type
This commit is contained in:
1 parent
b9e443b3b6
commit
50cfd296be
16 files changed
+1014
-410
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user