Exemple #1
0
        /// <summary>
        /// Set a predefined glow matching the preset types in Excel
        /// </summary>
        /// <param name="glowType">The preset type</param>
        public void SetPresetGlow(ePresetExcelGlowType glowType)
        {
            Glow.Delete();
            if (glowType == ePresetExcelGlowType.None)
            {
                return;
            }

            var glowTypeString = glowType.ToString();
            var font           = glowTypeString.Substring(0, glowTypeString.IndexOf('_'));
            var schemeColor    = (eSchemeColor)Enum.Parse(typeof(eSchemeColor), font);

            Glow.Color.SetSchemeColor(schemeColor);
            Glow.Color.Transforms.AddAlpha(40);
            Glow.Color.Transforms.AddSaturationModulation(175);
            Glow.Radius = int.Parse(glowTypeString.Substring(font.Length + 1, glowTypeString.Length - font.Length - 3));
        }
Exemple #2
0
        private static void AddPresetGlowShape(ExcelWorksheet ws, int row, int col, ePresetExcelGlowType preset)
        {
            var shape = AddShape(ws, row, col, preset.ToString());

            shape.Effect.SetPresetGlow(preset);
        }