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