//TODO: A IMPLEMENTER static void RenderingReverse(string whatToWrite, IStep stp, bool firstline) { int totallenght = 0; List <bool[, ]> msg = whatToWrite.ToList().Select(x => { var y = HelperLetterDefinition.Get(x.ToString()); totallenght += y.GetLength(1); return(y); }).ToList(); log(msg); bool[,] mainmessage = new bool[8, totallenght]; int localcursor = 0; foreach (bool[,] x in msg) { for (int j = 0; j < x.GetLength(1); j++) { for (int inc = 0; inc < Definition.Number_Led_X_Max7219; inc++) { mainmessage[inc, localcursor] = x[inc, j]; } localcursor++; } } int offsetstatic = totallenght - Definition.Number_Led_X_total; if (offsetstatic < 0) { offsetstatic = 0; } Thread.Sleep(period * 2); for (int o = 0; o <= offsetstatic; o++) { List <bool[, ]> z = new List <bool[, ]>(); int index = 0; int smallindex = 0; bool[,] current = new bool[Definition.Number_Led_X_Max7219, Definition.Number_Led_Y_Max7219]; for (int i = (0 + o); i < (Definition.Number_Led_X_total + o); i++) { index = i; if (index > totallenght + 1) //on a depasser la taille total du message le message ! { break; } if (smallindex > (Definition.Number_Led_X_Max7219 - 1)) //on cherche a remplir uniquement une matrix, sinon on passe au suivant { z.Add(current); current = new bool[Definition.Number_Led_X_Max7219, Definition.Number_Led_Y_Max7219]; smallindex = 0; } if (i < totallenght) { for (int inc = 0; inc < Definition.Number_Led_X_Max7219; inc++) { current[inc, smallindex] = mainmessage[inc, index]; } } smallindex++; if ((index == (Definition.Number_Led_X_total - 1) + o) && (smallindex != 1)) { z.Add(current); } } List <bool[, ]> dico = new List <bool[, ]>(); for (int inc = 0; inc < (Definition.Number_Max7219_X * Definition.Number_Max7219_Y); inc++) { dico.Add(z.Count > inc ? z[inc] : HelperLetterDefinition.EmptyMatrix); } stp.Apply(dico); Thread.Sleep(period); } }