//static readonly Brush dbHeaderBrush = new LinearGradientBrush(new Rectangle(0, 0, Consts.dbHeaderBlockLength, bmpHeight), Color.Silver, Color.GreenYellow, 270f); private static void DrawDBHeader(FileDBContext db, Bitmap[] bmps) { DBHeaderBlock dbHeader = db.GetDBHeaderBlock(); long index = 0; Graphics g = Graphics.FromImage(bmps[index]); int startPos = (int)(dbHeader.ThisPos - Consts.pageSize * index); int length = dbHeader.ToBytes().Length; Brush brush = new LinearGradientBrush(new Point(startPos, 0), new Point(startPos + length, 0), Color.Purple, Color.Aqua); g.FillRectangle(brush, startPos, 1, length, bmpHeight - 1); g.DrawRectangle(boundPen, startPos, 1, length, bmpHeight - 1); g.Dispose(); }