[Mono-devel-list] Cairo and System.Drawing

Alexandre Pigolkine pigolkine at gmx.de
Wed Oct 15 06:36:44 EDT 2003

Hello Jason,

You are right, System.Drawing has no C#-glue code as GTK# has.
It Pinvokes gdiplus and it calls Cairo.
But it's possible to consider gdiplus as some sort of C-glue code
between Sys.Drawing and Cairo.


Jason King wrote:

>Hiya, thanks for that.
>I would just like to get some stuff clear in my mind.
>For the GTK# stuff, a process is run as part of the build, and that process
>builds some C# wrappers around the underlying GTK+ and other libraries
>(Gnome, glade etc etc).  These C# wrappers take the form of <name>Sharp thus
>gladeSharp etc etc and they are what are commonly referred to as the 'glue'.
>GTK# then uses the glue, and the glue Pinvokes its way to the underlying
>unmanaged libraries.  Is that correct?
>Now, with the Cairo stuff, I am thinking that System.Drawing calls GDIPlus
>via pinvoke, and in turn, GDIPlus calls the underlying Cairo libraries.  If
>this is the case, then to my mind, there is no 'glue' code as I know it from
>the GTK# analogy.  To follow the same logical process as the GTK# system, if
>there is any "glue" code, then I guess there would be some GDIPlussharp or
>Cairosharp wrappers.
>Now, please do not think I am suggesting that it *should* go that way, I am
>merely trying to understand how this works, and my nearest frame of
>reference is the GTK# analogy.  If the glue code that Alexandre mentions
>below is included in System.Drawing namespace as private helper methods,
>then to me, that is not the same as the 'glue' analogy used in GTK#
>Please do not think I am criticising anyone or the marvellous work that has
>taken place, I am not picking holes, I am just trying to fill in gaps in my
>Jason King
>Profox Systems Ltd
>Mono-devel-list mailing list
>Mono-devel-list at lists.ximian.com

More information about the Mono-devel-list mailing list