private void paintCharset(Graphics g, FileCharset charset) { for (int f = 0; f < 16; f++) { for (int c = 0; c < 16; c++) { g.DrawRectangle(Pens.Black, c * (FileCharset.CharWidth + 2), f * (FileCharset.CharHeight + 2), FileCharset.CharWidth + 1, FileCharset.CharHeight + 1); if (charset != null) { Bitmap bmp = charset.getCharBitmap((byte)(f * 16 + c)); g.DrawImageUnscaled(bmp, c * (FileCharset.CharWidth + 2) + 1, f * (FileCharset.CharHeight + 2) + 1); } } } }
public void writeAtChr(int fila, int cols, int c) { Bitmap bmp; int f; if (fila < 0) { f = NumFilas + fila; } else { f = fila; } bmp = fcs.getCharBitmap((byte)c); if (!transparente) { g.FillRectangle(Brushes.Gray, cols * bmp.Width, f * bmp.Height, bmp.Width, bmp.Height); } g.DrawImage(bmp, cols * bmp.Width, f * bmp.Height); }