[Gtk-sharp-list] Re: OnPaint method
Sergio Rubio
sergio.rubio@hispalinux.es
Thu, 7 Apr 2005 00:38:22 +0200
On Tuesday 05 April 2005 20:08, Sergio Rubio wrote:
> Hi,
> I wonder if adding something like
>
> protected virtual void OnPaint (Graphics g)
> {
> //...
> }
>
> to the Widget class (Graphics from System.Drawing.Graphics) could be
> possible so the user doesn't have to do:
>
> Graphics g = Gtk.DotNet.Graphics.FromDrawable (EventExpose.Window);
>
> Does it make sense to the Gtk# core developers?
Hey again,
I would like to explain it better.
What I mean with the previous post is that if you don't read the blog about
the Graphics hack from Miguel allowing you to use System.Drawing.Graphics in
Gtk# or do a "$cat *.cs|grep Graphics" in samples dir of Gtk# it is not easy
to notice that you can draw in a widget using the same Gdi+ stuff the people
is using in System.Windows.Forms.
Having something like on OnPaint in Widget will help those comming from the
SWF world, and IMHO, it is an interesting alternative to Gnome.Canvas (It is
pretty similar to Java2D). BTW, does Gnome.Canvas work in windows?
Hope this triggers some answers from the devels.
Cheers,
Rubio.