Esempio n. 1
0
        public static bool Merge(HDMATable Table1, HDMATable Table2, out HDMATable Merged)
        {
            Merged = null;
            if (Table1.Count != Table2.Count)
            {
                return(false);
            }

            if (Table1.SequenceEqual(Table2, new HDMATableEntryComparer()))
            {
                Merged = new HDMATable();
                for (int i = 0; i < Table1.Count; i++)
                {
                    List <byte> values = new List <byte>();
                    values.AddRange(Table1[i].Values);
                    values.AddRange(Table2[i].Values);
                    Merged.Add(new HDMATableEntry(TableValueType.db, Table1[i].Scanlines, values.ToArray()));
                }
                if (!Merged.HasEnded())
                {
                    Merged.Add(HDMATableEntry.End);
                }
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
 public void FromTable(HDMATable table)
 {
     if (!table.HasEnded())
     {
         table.Add(HDMATableEntry.End);
     }
     Table = table;
     UpdateImage();
 }