[Gtk-sharp-list] how to use System.Drawing with gtk-sharp

Yao Heling linux@800e.net
Thu, 04 Mar 2004 22:37:44 +0800


Hello all,

I wonder whether it's possible to using System.Drawing with gtk-sharp
and how as I'm interested to see a cross platform canvas. so here's the
code with winform, could someone pls convert it to gtk-sharp? 

using System;
using System.Drawing;
using System.Windows.Forms;

public class BasicForm: Form
{
  public static void Main()
  {
    BasicForm f = new BasicForm();
    Application.Run(f);
  }
  protected override void OnPaint(PaintEventArgs e)
  {
    Graphics g = e.Graphics;
    g.DrawString("This is my string!", new Font("Arial",12),
			Brushes.Black, 25, 25);
    base.OnPaint(e);
  }
}

Basically, I'd like to access the Graphics so that I can use
System.Drawing stuff. 

I really appreciate any help/suggestions.


Joseph H. Yao

p.s: I'm not on the list, pls cc me when you reply. Thanks!