Пример #1
0
        public int TextWidth(Font f, string text)
        {
            int width = 0;

            foreach (char c in text)
            {
                CharStreamer cs = f.getChar(c);
                width += (int)cs.width;
            }
            return(width);
        }
Пример #2
0
 public void WriteText(Font f, Point p, string text, bool color)
 {
     foreach (char c in text)
     {
         CharStreamer cs = f.getChar(c);
         if (p.X + cs.width > Lcd.Width)
         {
             break;
         }
         DrawBitmap(cs, p, cs.width, cs.height, color);
         p.X += (int)cs.width;
     }
 }
Пример #3
0
 public void WriteText(Font f, Point p, string text, bool color)
 {
     foreach(char c in text)
     {
         CharStreamer cs = f.getChar(c);
         if (p.X+cs.width > Lcd.Width)
             break;
         DrawBitmap(cs, p, cs.width, cs.height, color);
         p.X += (int)cs.width;
     }
 }
Пример #4
0
 public int TextWidth(Font f, string text)
 {
     int width = 0;
     foreach(char c in text)
     {
         CharStreamer cs = f.getChar(c);
         width += (int)cs.width;
     }
     return width;
 }