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

+1 -1
View File
@@ -53,7 +53,7 @@ namespace RGB.NET.Brushes.Gradients
public override Color GetColor(double offset)
{
if (GradientStops.Count == 0) return Color.Transparent;
if (GradientStops.Count == 1) return new Color(GradientStops[0].Color);
if (GradientStops.Count == 1) return GradientStops[0].Color;
(GradientStop gsBefore, GradientStop gsAfter) = GetEnclosingGradientStops(offset, GradientStops, WrapGradient);
+1 -1
View File
@@ -56,7 +56,7 @@ namespace RGB.NET.Brushes.Gradients
double hue = (StartHue + (range * offset)) % 360f;
if (hue < 0)
hue += 360;
return new Color(hue, 1f, 1f);
return Color.FromHSV(hue, 1, 1);
}
/// <inheritdoc />