public void Serialize(ILittleEndianOutput out1) { out1.WriteShort(0); out1.WriteByte(0); out1.WriteByte(options); out1.WriteByte(percentMin); out1.WriteByte(percentMax); color.Serialize(out1); thresholdMin.Serialize(out1); thresholdMax.Serialize(out1); }
public void Serialize(ILittleEndianOutput out1) { out1.WriteShort(0); out1.WriteByte(0); out1.WriteByte(thresholds.Length); out1.WriteByte(thresholds.Length); out1.WriteByte(options); foreach (ColorGradientThreshold t in thresholds) { t.Serialize(out1); } double step = 1d / (colors.Length - 1); for (int i = 0; i < colors.Length; i++) { out1.WriteDouble(i * step); ExtendedColor c = colors[i]; c.Serialize(out1); } }