Added SKColor <-> Iris Color helpers

This commit is contained in:
Yoshi Askharoun
2021-10-08 14:32:02 -05:00
parent 160433666f
commit a7549934fb
+5 -1
View File
@@ -91,6 +91,10 @@ namespace Microsoft.Iris.Drawing
internal static Color FromArgb(int red, int green, int blue) => FromArgb(byte.MaxValue, red, green, blue);
internal static Color FromSKColor(SkiaSharp.SKColor skColor) => new(skColor.Alpha, skColor.Red, skColor.Blue, skColor.Green);
internal SkiaSharp.SKColor ToSKColor() => new(R, G, B, A);
internal float GetValue()
{
float num1 = R / (float)byte.MaxValue;
@@ -220,7 +224,7 @@ namespace Microsoft.Iris.Drawing
internal static Color Transparent => new Color(0U);
internal static Color Black => new Color(4278190080U);
internal static Color Black => new Color(0, 0, 0);
internal static Color White => new Color(uint.MaxValue);
}