[Gtk-sharp-list] Patches: Gdk.Rectangle/Gdk.Drawable and System.Drawing.Rectangle
Asier Llano Palacios
Mon, 20 Oct 2003 23:34:30 +0200
Just some loud thoughts:
a) I like the System.Drawing.Rectangle (not because it is better, but
because it was before), and it is a cosmetic begining until System.Drawing
is completely usable in Gtk#. (I mean for drawing, of course).
b) But, shouldn't it better to have implicit cast operators for the
convertion from/to System.Drawing.Rectangle to/from Gdk.Rectangle, so they
can be used if they were the same?
c) Another option could be not using Gdk.Rectangle at all, because it is
nearly the same as System.Drawing.Rectangle, so why have both? Maybe the
generator could change every Gdk.Rectangle instance to be
System.Drawing.Rectangle. For example, if there is a definition of an
'string' object in every library, would we define MyAssembly.String
everywhere instead of using System.String? I know it is not the same, but
.... So, I think System.Drawing.Rectangle could be used everywhere, just
because it is quite 'standard' (maybe "older" would be a better word, or
I don't know, but maybe the b) approach is the right one, but maybe the c)
one would make the Windows-to-Gtk people happier. I'm just curious about
your thoughts about all this. Sooner or later System.Drawing will be ready
to be used also in Gtk, and then, it would be a bit nicer if
System.Drawing.Rectangle is usable also everywhere with Gtk#.
Sorry for just loud-thinking but I'm so busy with my work that it is
imposible for me to help (or to do anything) until December (when I will try
to port everything I've done in C# to linux). I promise lot of bug reports
(and hopefully bug fixing).
Thank you very much for you great work.
> -----Mensaje original-----
> De: email@example.com [mailto:gtk-sharp-list-
> firstname.lastname@example.org] En nombre de Moritz Balz
> Enviado el: lunes, 20 de octubre de 2003 23:18
> Para: email@example.com
> Asunto: [Gtk-sharp-list] Patches: Gdk.Rectangle/Gdk.Drawable and
> attached are two patches that add overloaded methods in .custom files to
> make the use of System.Drawing.Rectangle (instead of Gdk.Rectangle)
> possible in
> - Gdk.Rectangle constructor
> - Gdk.Drawable.DrawRectangle method
> I'd like to be able to use System.Drawing.Rectangle in Gdk 'cause ist
> seems a bit more sophisticated than Gdk.Rectangle. If you think this is
> a good idea I'd be happy to see this patches go in.
> Uh ... it's the first time I used the diff tool. If something is wrong
> please let me know.