internal void SetRadialGradient(SLGradientPresetValues Preset, SLGradientDirectionValues Direction) { this.IsLinear = false; this.PathType = A.PathShadeValues.Circle; this.Direction = Direction; this.FillGradientStops(Preset); }
internal void SetRectangularGradient(SLGradientPresetValues Preset, SLGradientDirectionValues Direction) { IsLinear = false; PathType = A.PathShadeValues.Rectangle; this.Direction = Direction; FillGradientStops(Preset); }
/// <summary> /// Set a rectangular gradient given a preset setting. /// </summary> /// <param name="Preset">The preset to be used.</param> /// <param name="Direction">The rectangular gradient direction.</param> public void SetRectangularGradient(SLGradientPresetValues Preset, SLGradientDirectionValues Direction) { this.Type = SLFillType.GradientFill; this.GradientColor.SetRectangularGradient(Preset, Direction); }
/// <summary> /// Set a linear gradient given a preset setting. /// </summary> /// <param name="Preset">The preset to be used.</param> /// <param name="Angle">The interpolation angle ranging from 0 degrees to 359.9 degrees. 0 degrees mean from left to right, 90 degrees mean from top to bottom, 180 degrees mean from right to left and 270 degrees mean from bottom to top. Accurate to 1/60000 of a degree.</param> public void SetLinearGradient(SLGradientPresetValues Preset, decimal Angle) { this.Type = SLFillType.GradientFill; this.GradientColor.SetLinearGradient(Preset, Angle); }
/// <summary> /// Set a path gradient given a preset setting. /// </summary> /// <param name="Preset">The preset to be used.</param> public void SetPathGradient(SLGradientPresetValues Preset) { this.UseGradientLine = true; this.GradientColor.SetPathGradient(Preset); }
internal void FillGradientStops(SLGradientPresetValues PresetType) { this.GradientStops = new List<SLGradientStop>(); switch (PresetType) { case SLGradientPresetValues.EarlySunset: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "000082", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "66008F", 30)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "BA0066", 64.999m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FF0000", 89.999m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FF8200", 100)); break; case SLGradientPresetValues.LateSunset: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "000000", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "000040", 20)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "400040", 50)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "8F0040", 75)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "F27300", 89.999m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFBF00", 100)); break; case SLGradientPresetValues.Nightfall: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "000000", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "0A128C", 39.999m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "181CC7", 70)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "7005D4", 88)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "8C3D91", 100)); break; case SLGradientPresetValues.Daybreak: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "5E9EFF", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "85C2FF", 39.999m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "C4D6EB", 70)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFEBFA", 100)); break; case SLGradientPresetValues.Horizon: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "DCEBF5", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "83A7C3", 8)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "768FB9", 13)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "83A7C3", 21.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFFFFF", 52)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "9C6563", 56)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "80302D", 58)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "C0524E", 71.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "EBDAD4", 94)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "55261C", 100)); break; case SLGradientPresetValues.Desert: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FC9FCB", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "F8B049", 13)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "F8B049", 21.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FEE7F2", 63)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "F952A0", 67)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "C50849", 69)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "B43E85", 82.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "F8B049", 100)); break; case SLGradientPresetValues.Ocean: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "03D4A8", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "21D6E0", 25)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "0087E6", 75)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "005CBF", 100)); break; case SLGradientPresetValues.CalmWater: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "CCCCFF", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "99CCFF", 17.999m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "9966FF", 36)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "CC99FF", 61)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "99CCFF", 82.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "CCCCFF", 100)); break; case SLGradientPresetValues.Fire: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFF200", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FF7A00", 45)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FF0300", 70)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "4D0808", 100)); break; case SLGradientPresetValues.Fog: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "8488C4", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "D4DEFF", 53)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "D4DEFF", 83)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "96AB94", 100)); break; case SLGradientPresetValues.Moss: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "DDEBCF", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "9CB86E", 50)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "156B13", 100)); break; case SLGradientPresetValues.Peacock: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "3399FF", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "00CCCC", 16)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "9999FF", 47)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "2E6792", 60.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "3333CC", 71.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "1170FF", 81)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "006699", 100)); break; case SLGradientPresetValues.Wheat: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FBEAC7", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FEE7F2", 17.999m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FAC77D", 36)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FBA97D", 61)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FBD49C", 82.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FEE7F2", 100)); break; case SLGradientPresetValues.Parchment: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFEFD1", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "F0EBD5", 64.999m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "D1C39F", 100)); break; case SLGradientPresetValues.Mahogany: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "D6B19C", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "D49E6C", 30)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "A65528", 70)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "663012", 100)); break; case SLGradientPresetValues.Rainbow: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "A603AB", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "0819FB", 21.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "1A8D48", 35.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFFF00", 52)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "EE3F17", 73)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "E81766", 88)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "A603AB", 100)); break; case SLGradientPresetValues.Rainbow2: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FF3399", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FF6633", 25)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFFF00", 50)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "01A78F", 75)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "3366FF", 100)); break; case SLGradientPresetValues.Gold: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "E6DCAC", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "E6D78A", 12)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "C7AC4C", 30)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "E6D78A", 45)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "C7AC4C", 77)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "E6DCAC", 100)); break; case SLGradientPresetValues.Gold2: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FBE4AE", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "BD922A", 13)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "BD922A", 21.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FBE4AE", 63)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "BD922A", 67)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "835E17", 69)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "A28949", 82.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FAE3B7", 100)); break; case SLGradientPresetValues.Brass: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "825600", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFA800", 13)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "825600", 28)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFA800", 42.999m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "825600", 58)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFA800", 72)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "825600", 87)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFA800", 100)); break; case SLGradientPresetValues.Chrome: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFFFFF", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "1F1F1F", 16)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFFFFF", 17.999m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "636363", 42)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "CFCFCF", 53)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "CFCFCF", 66)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "1F1F1F", 75.999m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFFFFF", 78.999m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "7F7F7F", 100)); break; case SLGradientPresetValues.Chrome2: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "CBCBCB", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "5F5F5F", 13)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "5F5F5F", 21.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFFFFF", 63)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "B2B2B2", 67)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "292929", 69)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "777777", 82.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "EAEAEA", 100)); break; case SLGradientPresetValues.Silver: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "FFFFFF", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "E6E6E6", 7.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "7D8496", 32.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "E6E6E6", 47)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "7D8496", 85.001m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "E6E6E6", 100)); break; case SLGradientPresetValues.Sapphire: this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "000082", 0)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "0047FF", 13)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "000082", 28)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "0047FF", 42.999m)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "000082", 58)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "0047FF", 72)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "000082", 87)); this.GradientStops.Add(new SLGradientStop(this.listThemeColors, "0047FF", 100)); break; } }
/// <summary> /// Set a rectangular gradient given a preset setting. /// </summary> /// <param name="Preset">The preset to be used.</param> /// <param name="Direction">The rectangular gradient direction.</param> public void SetRectangularGradient(SLGradientPresetValues Preset, SLGradientDirectionValues Direction) { this.UseGradientLine = true; this.GradientColor.SetRectangularGradient(Preset, Direction); }
internal void SetLinearGradient(SLGradientPresetValues Preset, decimal Angle) { IsLinear = true; this.Angle = Angle; FillGradientStops(Preset); }
internal void SetPathGradient(SLGradientPresetValues Preset) { IsLinear = false; PathType = A.PathShadeValues.Shape; FillGradientStops(Preset); }
/// <summary> /// Set a radial gradient given a preset setting. /// </summary> /// <param name="Preset">The preset to be used.</param> /// <param name="Direction">The radial gradient direction.</param> public void SetRadialGradient(SLGradientPresetValues Preset, SLGradientDirectionValues Direction) { UseGradientLine = true; GradientColor.SetRadialGradient(Preset, Direction); }
internal void SetPathGradient(SLGradientPresetValues Preset) { this.IsLinear = false; this.PathType = A.PathShadeValues.Shape; this.FillGradientStops(Preset); }
internal void SetLinearGradient(SLGradientPresetValues Preset, decimal Angle) { this.IsLinear = true; this.Angle = Angle; this.FillGradientStops(Preset); }
/// <summary> /// Set a path gradient given a preset setting. /// </summary> /// <param name="Preset">The preset to be used.</param> public void SetPathGradient(SLGradientPresetValues Preset) { this.Type = SLFillType.GradientFill; this.GradientColor.SetPathGradient(Preset); }
internal void FillGradientStops(SLGradientPresetValues PresetType) { GradientStops = new List <SLGradientStop>(); switch (PresetType) { case SLGradientPresetValues.EarlySunset: GradientStops.Add(new SLGradientStop(listThemeColors, "000082", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "66008F", 30)); GradientStops.Add(new SLGradientStop(listThemeColors, "BA0066", 64.999m)); GradientStops.Add(new SLGradientStop(listThemeColors, "FF0000", 89.999m)); GradientStops.Add(new SLGradientStop(listThemeColors, "FF8200", 100)); break; case SLGradientPresetValues.LateSunset: GradientStops.Add(new SLGradientStop(listThemeColors, "000000", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "000040", 20)); GradientStops.Add(new SLGradientStop(listThemeColors, "400040", 50)); GradientStops.Add(new SLGradientStop(listThemeColors, "8F0040", 75)); GradientStops.Add(new SLGradientStop(listThemeColors, "F27300", 89.999m)); GradientStops.Add(new SLGradientStop(listThemeColors, "FFBF00", 100)); break; case SLGradientPresetValues.Nightfall: GradientStops.Add(new SLGradientStop(listThemeColors, "000000", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "0A128C", 39.999m)); GradientStops.Add(new SLGradientStop(listThemeColors, "181CC7", 70)); GradientStops.Add(new SLGradientStop(listThemeColors, "7005D4", 88)); GradientStops.Add(new SLGradientStop(listThemeColors, "8C3D91", 100)); break; case SLGradientPresetValues.Daybreak: GradientStops.Add(new SLGradientStop(listThemeColors, "5E9EFF", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "85C2FF", 39.999m)); GradientStops.Add(new SLGradientStop(listThemeColors, "C4D6EB", 70)); GradientStops.Add(new SLGradientStop(listThemeColors, "FFEBFA", 100)); break; case SLGradientPresetValues.Horizon: GradientStops.Add(new SLGradientStop(listThemeColors, "DCEBF5", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "83A7C3", 8)); GradientStops.Add(new SLGradientStop(listThemeColors, "768FB9", 13)); GradientStops.Add(new SLGradientStop(listThemeColors, "83A7C3", 21.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "FFFFFF", 52)); GradientStops.Add(new SLGradientStop(listThemeColors, "9C6563", 56)); GradientStops.Add(new SLGradientStop(listThemeColors, "80302D", 58)); GradientStops.Add(new SLGradientStop(listThemeColors, "C0524E", 71.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "EBDAD4", 94)); GradientStops.Add(new SLGradientStop(listThemeColors, "55261C", 100)); break; case SLGradientPresetValues.Desert: GradientStops.Add(new SLGradientStop(listThemeColors, "FC9FCB", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "F8B049", 13)); GradientStops.Add(new SLGradientStop(listThemeColors, "F8B049", 21.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "FEE7F2", 63)); GradientStops.Add(new SLGradientStop(listThemeColors, "F952A0", 67)); GradientStops.Add(new SLGradientStop(listThemeColors, "C50849", 69)); GradientStops.Add(new SLGradientStop(listThemeColors, "B43E85", 82.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "F8B049", 100)); break; case SLGradientPresetValues.Ocean: GradientStops.Add(new SLGradientStop(listThemeColors, "03D4A8", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "21D6E0", 25)); GradientStops.Add(new SLGradientStop(listThemeColors, "0087E6", 75)); GradientStops.Add(new SLGradientStop(listThemeColors, "005CBF", 100)); break; case SLGradientPresetValues.CalmWater: GradientStops.Add(new SLGradientStop(listThemeColors, "CCCCFF", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "99CCFF", 17.999m)); GradientStops.Add(new SLGradientStop(listThemeColors, "9966FF", 36)); GradientStops.Add(new SLGradientStop(listThemeColors, "CC99FF", 61)); GradientStops.Add(new SLGradientStop(listThemeColors, "99CCFF", 82.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "CCCCFF", 100)); break; case SLGradientPresetValues.Fire: GradientStops.Add(new SLGradientStop(listThemeColors, "FFF200", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "FF7A00", 45)); GradientStops.Add(new SLGradientStop(listThemeColors, "FF0300", 70)); GradientStops.Add(new SLGradientStop(listThemeColors, "4D0808", 100)); break; case SLGradientPresetValues.Fog: GradientStops.Add(new SLGradientStop(listThemeColors, "8488C4", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "D4DEFF", 53)); GradientStops.Add(new SLGradientStop(listThemeColors, "D4DEFF", 83)); GradientStops.Add(new SLGradientStop(listThemeColors, "96AB94", 100)); break; case SLGradientPresetValues.Moss: GradientStops.Add(new SLGradientStop(listThemeColors, "DDEBCF", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "9CB86E", 50)); GradientStops.Add(new SLGradientStop(listThemeColors, "156B13", 100)); break; case SLGradientPresetValues.Peacock: GradientStops.Add(new SLGradientStop(listThemeColors, "3399FF", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "00CCCC", 16)); GradientStops.Add(new SLGradientStop(listThemeColors, "9999FF", 47)); GradientStops.Add(new SLGradientStop(listThemeColors, "2E6792", 60.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "3333CC", 71.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "1170FF", 81)); GradientStops.Add(new SLGradientStop(listThemeColors, "006699", 100)); break; case SLGradientPresetValues.Wheat: GradientStops.Add(new SLGradientStop(listThemeColors, "FBEAC7", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "FEE7F2", 17.999m)); GradientStops.Add(new SLGradientStop(listThemeColors, "FAC77D", 36)); GradientStops.Add(new SLGradientStop(listThemeColors, "FBA97D", 61)); GradientStops.Add(new SLGradientStop(listThemeColors, "FBD49C", 82.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "FEE7F2", 100)); break; case SLGradientPresetValues.Parchment: GradientStops.Add(new SLGradientStop(listThemeColors, "FFEFD1", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "F0EBD5", 64.999m)); GradientStops.Add(new SLGradientStop(listThemeColors, "D1C39F", 100)); break; case SLGradientPresetValues.Mahogany: GradientStops.Add(new SLGradientStop(listThemeColors, "D6B19C", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "D49E6C", 30)); GradientStops.Add(new SLGradientStop(listThemeColors, "A65528", 70)); GradientStops.Add(new SLGradientStop(listThemeColors, "663012", 100)); break; case SLGradientPresetValues.Rainbow: GradientStops.Add(new SLGradientStop(listThemeColors, "A603AB", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "0819FB", 21.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "1A8D48", 35.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "FFFF00", 52)); GradientStops.Add(new SLGradientStop(listThemeColors, "EE3F17", 73)); GradientStops.Add(new SLGradientStop(listThemeColors, "E81766", 88)); GradientStops.Add(new SLGradientStop(listThemeColors, "A603AB", 100)); break; case SLGradientPresetValues.Rainbow2: GradientStops.Add(new SLGradientStop(listThemeColors, "FF3399", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "FF6633", 25)); GradientStops.Add(new SLGradientStop(listThemeColors, "FFFF00", 50)); GradientStops.Add(new SLGradientStop(listThemeColors, "01A78F", 75)); GradientStops.Add(new SLGradientStop(listThemeColors, "3366FF", 100)); break; case SLGradientPresetValues.Gold: GradientStops.Add(new SLGradientStop(listThemeColors, "E6DCAC", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "E6D78A", 12)); GradientStops.Add(new SLGradientStop(listThemeColors, "C7AC4C", 30)); GradientStops.Add(new SLGradientStop(listThemeColors, "E6D78A", 45)); GradientStops.Add(new SLGradientStop(listThemeColors, "C7AC4C", 77)); GradientStops.Add(new SLGradientStop(listThemeColors, "E6DCAC", 100)); break; case SLGradientPresetValues.Gold2: GradientStops.Add(new SLGradientStop(listThemeColors, "FBE4AE", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "BD922A", 13)); GradientStops.Add(new SLGradientStop(listThemeColors, "BD922A", 21.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "FBE4AE", 63)); GradientStops.Add(new SLGradientStop(listThemeColors, "BD922A", 67)); GradientStops.Add(new SLGradientStop(listThemeColors, "835E17", 69)); GradientStops.Add(new SLGradientStop(listThemeColors, "A28949", 82.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "FAE3B7", 100)); break; case SLGradientPresetValues.Brass: GradientStops.Add(new SLGradientStop(listThemeColors, "825600", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "FFA800", 13)); GradientStops.Add(new SLGradientStop(listThemeColors, "825600", 28)); GradientStops.Add(new SLGradientStop(listThemeColors, "FFA800", 42.999m)); GradientStops.Add(new SLGradientStop(listThemeColors, "825600", 58)); GradientStops.Add(new SLGradientStop(listThemeColors, "FFA800", 72)); GradientStops.Add(new SLGradientStop(listThemeColors, "825600", 87)); GradientStops.Add(new SLGradientStop(listThemeColors, "FFA800", 100)); break; case SLGradientPresetValues.Chrome: GradientStops.Add(new SLGradientStop(listThemeColors, "FFFFFF", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "1F1F1F", 16)); GradientStops.Add(new SLGradientStop(listThemeColors, "FFFFFF", 17.999m)); GradientStops.Add(new SLGradientStop(listThemeColors, "636363", 42)); GradientStops.Add(new SLGradientStop(listThemeColors, "CFCFCF", 53)); GradientStops.Add(new SLGradientStop(listThemeColors, "CFCFCF", 66)); GradientStops.Add(new SLGradientStop(listThemeColors, "1F1F1F", 75.999m)); GradientStops.Add(new SLGradientStop(listThemeColors, "FFFFFF", 78.999m)); GradientStops.Add(new SLGradientStop(listThemeColors, "7F7F7F", 100)); break; case SLGradientPresetValues.Chrome2: GradientStops.Add(new SLGradientStop(listThemeColors, "CBCBCB", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "5F5F5F", 13)); GradientStops.Add(new SLGradientStop(listThemeColors, "5F5F5F", 21.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "FFFFFF", 63)); GradientStops.Add(new SLGradientStop(listThemeColors, "B2B2B2", 67)); GradientStops.Add(new SLGradientStop(listThemeColors, "292929", 69)); GradientStops.Add(new SLGradientStop(listThemeColors, "777777", 82.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "EAEAEA", 100)); break; case SLGradientPresetValues.Silver: GradientStops.Add(new SLGradientStop(listThemeColors, "FFFFFF", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "E6E6E6", 7.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "7D8496", 32.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "E6E6E6", 47)); GradientStops.Add(new SLGradientStop(listThemeColors, "7D8496", 85.001m)); GradientStops.Add(new SLGradientStop(listThemeColors, "E6E6E6", 100)); break; case SLGradientPresetValues.Sapphire: GradientStops.Add(new SLGradientStop(listThemeColors, "000082", 0)); GradientStops.Add(new SLGradientStop(listThemeColors, "0047FF", 13)); GradientStops.Add(new SLGradientStop(listThemeColors, "000082", 28)); GradientStops.Add(new SLGradientStop(listThemeColors, "0047FF", 42.999m)); GradientStops.Add(new SLGradientStop(listThemeColors, "000082", 58)); GradientStops.Add(new SLGradientStop(listThemeColors, "0047FF", 72)); GradientStops.Add(new SLGradientStop(listThemeColors, "000082", 87)); GradientStops.Add(new SLGradientStop(listThemeColors, "0047FF", 100)); break; } }
/// <summary> /// Set a linear gradient given a preset setting. /// </summary> /// <param name="Preset">The preset to be used.</param> /// <param name="Angle">The interpolation angle ranging from 0 degrees to 359.9 degrees. 0 degrees mean from left to right, 90 degrees mean from top to bottom, 180 degrees mean from right to left and 270 degrees mean from bottom to top. Accurate to 1/60000 of a degree.</param> public void SetLinearGradient(SLGradientPresetValues Preset, decimal Angle) { this.UseGradientLine = true; this.GradientColor.SetLinearGradient(Preset, Angle); }
/// <summary> /// Set a radial gradient given a preset setting. /// </summary> /// <param name="Preset">The preset to be used.</param> /// <param name="Direction">The radial gradient direction.</param> public void SetRadialGradient(SLGradientPresetValues Preset, SLGradientDirectionValues Direction) { Type = SLFillType.GradientFill; GradientColor.SetRadialGradient(Preset, Direction); }