using System; using System.Drawing; using Cairo; using Gdk; using Gtk; class Area : DrawingArea { public ImageSurface surface; protected override bool OnDrawn(Context cr) // малювання { cr.SetSourceSurface(surface, 0, 0); cr.Paint(); return true; } } class OwnWindow : Gtk.Window { public OwnWindow(string s) : base("Опрацювання пікселів") { Area a1 = new Area(); Area a2 = new Area(); try { a1.surface = new ImageSurface(s); } catch { Console.WriteLine("Файлу зображення не знайдено"); Environment.Exit(1); } Bitmap bm = new Bitmap(s); // Зчитування з файлу s for (int j=0; j