public void AddColor(Color2 pixel) { int packed = pixel.GetPackedValue(); if (previousColor.Equals(packed)) { if (previousNode == null) { previousColor = packed; root.AddColor(pixel, maxColorBits, 0, this); } else { previousNode.Increment(pixel); } } else { previousColor = packed; root.AddColor(pixel, maxColorBits, 0, this); } }
public void AddColor(Color2 pixel) { int packed = pixel.GetPackedValue(); if (previousColor.Equals(packed)){ if (previousNode == null){ previousColor = packed; root.AddColor(pixel, maxColorBits, 0, this); } else{ previousNode.Increment(pixel); } } else{ previousColor = packed; root.AddColor(pixel, maxColorBits, 0, this); } }