Exemplo n.º 1
0
        private List <Palette.Swatch> GenerateAverageColors(CustomHeap <Vbox> vboxes)
        {
            List <Palette.Swatch> colors = new List <Palette.Swatch>(vboxes.count);

            foreach (Vbox vbox in vboxes)
            {
                Palette.Swatch color = vbox.GetAverageColor();
                if (!ShouldIgnoreColor(color))
                {
                    // As we're averaging a color box, we can still get colors which we do not want, so
                    // we check again here
                    colors.Add(color);
                }
            }

            Tizen.Log.Info("Palette", "Final generated color count = " + colors.Count + "\n");
            return(colors);
        }
Exemplo n.º 2
0
 private static Boolean ShouldIgnoreColor(Palette.Swatch color)
 {
     return(ShouldIgnoreColor(color.GetHsl()));
 }