Beispiel #1
0
		public CharStreamer getChar(char c)
		{
			int index = (int)c - 32;
			if (index < 0 || (index > 128-32))
				index = 0;
			CharStreamer result = new CharStreamer(maxHeight, data, (int)(firstChar+index*charWordSize));			
			return result;
		}		
Beispiel #2
0
        public Point TextSize(string text)
        {
            int width = 0;

            foreach (char c in text)
            {
                CharStreamer cs = getChar(c);
                width += (int)cs.width;
            }
            return(new Point(width, (int)maxHeight));
        }
Beispiel #3
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);
        }
Beispiel #4
0
        public CharStreamer getChar(char c)
        {
            int index = (int)c - 32;

            if (index < 0 || (index > 128 - 32))
            {
                index = 0;
            }
            CharStreamer result = new CharStreamer(maxHeight, data, (int)(firstChar + index * charWordSize));

            return(result);
        }
Beispiel #5
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;
     }
 }