Beispiel #1
0
        private void createBitmaps()
        {
            int height = this.font.Height + 1;

            this.embeddedFont = new EmbeddedFont(height);
            for (char c = ' '; c < 0x7F; c++)
            {
                Color[,] bm = createBitmap(c);
                CharBitmap cbm = embeddedFont.NewChar(bm.GetLength(0));
                cbm.SetChar(c);
                for (int x = 0; x < cbm.GetWidth(); x++)
                {
                    for (int y = 0; y < cbm.GetHeight(); y++)
                    {
                        if (bm[x, y].ToArgb() == Color.Black.ToArgb())
                        {
                            cbm.SetForegroundColor(x, y);
                        }
                        else
                        {
                            cbm.SetBackgroundColor(x, y);
                        }
                    }
                }
            }
        }
Beispiel #2
0
 private void createBitmaps()
 {
     int height = this.font.Height + 1;
       this.embeddedFont = new EmbeddedFont(height);
       for (char c = ' '; c < 0x7F; c++)
       {
     Color[,] bm = createBitmap(c);
     CharBitmap cbm = embeddedFont.NewChar(bm.GetLength(0));
     cbm.SetChar(c);
     for (int x = 0; x < cbm.GetWidth(); x++)
     {
       for (int y = 0; y < cbm.GetHeight(); y++)
       {
     if (bm[x, y].ToArgb() == Color.Black.ToArgb())
     {
       cbm.SetForegroundColor(x, y);
     }
     else
     {
       cbm.SetBackgroundColor(x, y);
     }
       }
     }
       }
 }