All pastes #22997 Raw Edit

Untitled

public text v1 · immutable
#22997 ·published 2005-09-15 16:36 UTC
rendered paste body
using System.Drawing;
using Gtk;

class PrettyGraphic : DrawingArea {

     public PrettyGraphic ()
     {
          SetSizeRequest (200, 200);
     }
                      
     protected override bool OnExposeEvent (Gdk.EventExpose args)
     {
          using (Graphics g = Gtk.DotNet.Graphics.FromDrawable (args.Window)){
               Pen p = new Pen (Color.Blue, 1.0f);

               for (int i = 0; i < 600; i += 60)
                    for (int j = 0; j < 600; j += 60)
                         g.DrawLine (p, i, 0, 0, j);
          }
          return true;
     }
}