我有以下的GradientStopCollection
:
GradientStopCollection grsc = new GradientStopCollection(3);
grsc.Add(new GradientStop(Colors.Red, 0));
grsc.Add(new GradientStop(Colors.Yellow, .5));
grsc.Add(new GradientStop(Colors.Green, 1));
我可以获取特定“位置”的颜色吗? 例如:
- 位置0:红色
- 位置.5:黄色
- 位置.75:
Yellow<~>Green
在 WPF
/ 一些第三方库中是否有 API 可以实现这个功能?