ColorGradient - Fixed GetColor returning the first stop if position was after the last stop

This commit is contained in:
Robert committed 2023-06-24 15:44:06 +02:00
1 parent f43ebd2153
commit 4726190355
1 file changed
+1 -1
@@ -241,7 +241,7 @@ public class ColorGradient : IList<ColorGradientStop>, IList, INotifyCollectionC
return _stops[^1].Color;
//find the first stop after the position
int stop2Index = 0;
int stop2Index = -1;
for (int i = 0; i < _stops.Count; i++)
{