public AssStyleOptions(AssStyle style) { Name = style.Name; if (style.HasOutline && !style.HasOutlineBox) { ShadowTypes.Add(ShadowType.Glow); } if (style.HasShadow) { ShadowTypes.Add(ShadowType.SoftShadow); } }
/// <summary> /// 添加影子 /// </summary> /// <param name="id">序号</param> /// <param name="shadowType">类型</param> public void AddShadow(long id, ShadowTypes shadowType) { EntityObject shadow = new EntityObject() { ID = id }; if (shadowType == ShadowTypes.Simple) { shadow.Source = GlobalMethod.GetImage("UI/Shadow.png", UriType.Project); } shadow.Center = new Point(shadow.Source.PixelWidth / 2, shadow.Source.PixelHeight / 2); shadowList.Add(shadow); shadowRoot.Children.Add(shadow); }