Ejemplo n.º 1
0
            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);
                }
            }
Ejemplo n.º 2
0
 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);
     }
 }