From 7fc7ae79decdbc33dfd513861539d60bef2fd157 Mon Sep 17 00:00:00 2001 From: Jumar Macato Date: Mon, 10 Dec 2018 00:57:13 +0800 Subject: [PATCH] Fix Color parameters on ColorAnimator --- src/Avalonia.Visuals/Animation/Animators/ColorAnimator.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Visuals/Animation/Animators/ColorAnimator.cs b/src/Avalonia.Visuals/Animation/Animators/ColorAnimator.cs index 1bd84dc9a2..a6fadeb7ad 100644 --- a/src/Avalonia.Visuals/Animation/Animators/ColorAnimator.cs +++ b/src/Avalonia.Visuals/Animation/Animators/ColorAnimator.cs @@ -46,6 +46,7 @@ namespace Avalonia.Animation.Animators oldR = EOCF_sRGB(oldR); oldG = EOCF_sRGB(oldG); oldB = EOCF_sRGB(oldB); + newR = EOCF_sRGB(newR); newG = EOCF_sRGB(newG); newB = EOCF_sRGB(newB); @@ -62,7 +63,7 @@ namespace Avalonia.Animation.Animators g = OECF_sRGB(g) * 255d; b = OECF_sRGB(b) * 255d; - return new Color((byte)Math.Round(r), (byte)Math.Round(g), (byte)Math.Round(b), (byte)Math.Round(a)); + return new Color((byte)Math.Round(a), (byte)Math.Round(r), (byte)Math.Round(g), (byte)Math.Round(b)); } } -} \ No newline at end of file +}