private void WriteRGBColor(EndianBinaryWriter writer, NamedColor c) { writer.Write((ushort)((c.Color.R / 255.0f) * ushort.MaxValue)); writer.Write((ushort)((c.Color.G / 255.0f) * ushort.MaxValue)); writer.Write((ushort)((c.Color.B / 255.0f) * ushort.MaxValue)); writer.Write((ushort)0); }
public override void CopyTo(NamedColor[] array, int start) { _colors.CopyTo(array, start); }
public override void Add(NamedColor color) { Dirty = true; _colors.Add(color); }
public override void Insert(int index, NamedColor color) { Dirty = true; _colors.Insert(index, color); }
private void WriteRGBColor(EndianBinaryWriter writer, NamedColor c) { writer.Write((ushort) ((c.Color.R / 255.0f) * ushort.MaxValue)); writer.Write((ushort) ((c.Color.G / 255.0f) * ushort.MaxValue)); writer.Write((ushort) ((c.Color.B / 255.0f) * ushort.MaxValue)); writer.Write((ushort) 0); }
bool ICollection <NamedColor> .Remove(NamedColor color) { throw new InvalidOperationException(); }
bool ICollection <NamedColor> .Contains(NamedColor color) { throw new InvalidOperationException(); }
int IList <NamedColor> .IndexOf(NamedColor color) { throw new InvalidOperationException(); }
public abstract void Add(NamedColor color);
// Operations not supported by this interface. // These are because dupe colors are allowed. // Operations implementors must implement. public abstract void Insert(int index, NamedColor color);