public IList<Shape> Execute(StyleOption option, EffectsDesigner designer, ImageItem source, Shape imageShape) { var result = new List<Shape>(); if (option.IsUseFrostedGlassBannerStyle) { var blurDegreeForFrostedGlass = EffectsDesigner.BlurDegreeForFrostedGlassEffect; var blurImageShape = option.IsUseSpecialEffectStyle ? designer.ApplyBlurEffect(source.SpecialEffectImageFile, blurDegreeForFrostedGlass) : designer.ApplyBlurEffect(degree: blurDegreeForFrostedGlass); var banner = designer.ApplyFrostedGlassBannerEffect(option.GetBannerDirection(), option.GetTextBoxPosition(), blurImageShape, option.FrostedGlassBannerColor, option.FrostedGlassBannerTransparency); result.Add(banner); blurImageShape.Delete(); } return result; }
public IList <Shape> Execute(StyleOption option, EffectsDesigner designer, ImageItem source, Shape imageShape, Settings settings) { List <Shape> result = new List <Shape>(); if (option.IsUseFrostedGlassBannerStyle) { int blurDegreeForFrostedGlass = EffectsDesigner.BlurDegreeForFrostedGlassEffect; Shape blurImageShape = option.IsUseSpecialEffectStyle ? designer.ApplyBlurEffect(source.SpecialEffectImageFile, blurDegreeForFrostedGlass) : designer.ApplyBlurEffect(degree: blurDegreeForFrostedGlass); Shape banner = designer.ApplyFrostedGlassBannerEffect(option.GetBannerDirection(), option.GetTextBoxPosition(), blurImageShape, option.FrostedGlassBannerColor, option.FrostedGlassBannerTransparency); result.Add(banner); blurImageShape.SafeDelete(); } return(result); }