public ElementGroup CreateGroup(float zDistance) { var elementGroup = new ElementGroup(zDistance); GroupList.Add(zDistance, elementGroup); return(elementGroup); }
public static ElementGroup Adjust(ElementGroup elementGroup, float offsetX, float offsetY, int offsetTiming) { foreach (var obj in elementGroup.ElementList) { obj.Adjust(offsetX, offsetY, offsetTiming); } return(elementGroup); }
private static void InnerFix(this ElementGroup eleG, bool expand, bool fillFadeout) { if (!expand && !fillFadeout) { return; } foreach (var ec in eleG.ElementList) { if (!(ec is Element ele)) { continue; } if (expand) { ele.Expand(); } if (fillFadeout) { ele.FillObsoleteList(); } } }
public ElementCompressor(ElementGroup elementGroup) { _elements = elementGroup.ElementList.Where(k => k is Element).Cast <Element>().ToList(); }
public static void FillObsoleteList(this ElementGroup eleG) { eleG.InnerFix(false, true); }
public static void Expand(this ElementGroup eleG) { eleG.InnerFix(true, false); }
public static void ExpandAndFillFadeout(this ElementGroup eleG) { eleG.InnerFix(true, true); }
public static async Task ExpandAsync(this ElementGroup eleG) { await Task.Run(() => { Expand(eleG); }); }
public void DeleteGroup(ElementGroup elementGroup) { GroupList.Remove(elementGroup.ZDistance); }
public void AddGroup(ElementGroup elementGroup) { GroupList.Add(elementGroup.ZDistance, elementGroup); }