/// <summary> /// Build a list of CSS/XML-like <see cref="ColorBlend"/> objects from a <see cref="GradientTheme"/> <see cref="ColorBlend"/> /// </summary> /// <param name="colorBlend">The original <see cref="ColorBlend"/> with colors and positions</param> /// <returns>An array of object containing a color and position; to be used to store as XML</returns> private static colorBlend[] CreateBlendsFromTheme(ColorBlend colorBlend) { var fillColorBlends = new List <colorBlend>(); for (int i = 0; i < colorBlend.Positions.Length; i++) { var fillBlend = new colorBlend(); fillBlend.color = ColorTranslator.ToHtml(colorBlend.Colors[i]); fillBlend.position = colorBlend.Positions[i]; fillColorBlends.Add(fillBlend); } return(fillColorBlends.ToArray()); }
/// <summary> /// Build a list of CSS/XML-like <see cref="ColorBlend"/> objects from a <see cref="GradientTheme"/> <see cref="ColorBlend"/> /// </summary> /// <param name="colorBlend">The original <see cref="ColorBlend"/> with colors and positions</param> /// <returns>An array of object containing a color and position; to be used to store as XML</returns> private static colorBlend[] CreateBlendsFromTheme(ColorBlend colorBlend) { var fillColorBlends = new List<colorBlend>(); for (int i = 0; i < colorBlend.Positions.Length; i++) { var fillBlend = new colorBlend(); fillBlend.color = ColorTranslator.ToHtml(colorBlend.Colors[i]); fillBlend.position = colorBlend.Positions[i]; fillColorBlends.Add(fillBlend); } return fillColorBlends.ToArray(); }