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); }
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); }