예제 #1
0
        public string IndexIntensity(int index)
        {
            current = 255;
            int lev = index / 6;

            for (int i = 0; i < lev; i++)
            {
                if (walker == null)
                {
                    walker = new IntensityValueWalker();
                }
                else
                {
                    walker.MoveNext();
                }
                current = walker.Current.Value;
            }
            string currentText = current.ToString("X");

            if (currentText.Length == 1)
            {
                currentText = "0" + currentText;
            }
            return(currentText);
        }
예제 #2
0
        public string NextIntensity(int index)
        {
            if (index == 0)
            {
                current = 255;
            }
            else if (index % 6 == 0)
            {
                if (walker == null)
                {
                    walker = new IntensityValueWalker();
                }
                else
                {
                    walker.MoveNext();
                }
                current = walker.Current.Value;
            }
            string currentText = current.ToString("X");

            if (currentText.Length == 1)
            {
                currentText = "0" + currentText;
            }
            return(currentText);
        }