Пример #1
0
 public unsafe Palette(PaletteEntry* p, int count)
 {
     Entries = new PaletteEntry[count];
     // todo: memcpy
     fixed (PaletteEntry* pEntries = Entries)
     {
         for (int i = 0; i < count; i++)
         {
             pEntries[i] = *p;
             p += PaletteEntry.StructLength;
         }
     }
 }
Пример #2
0
 public Palette(PaletteEntry[] entries)
 {
     if (entries == null)
         throw new ArgumentNullException("entries");
     Entries = entries;
 }