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

Jason King jason.king at profox.co.uk
Wed Oct 15 05:03:14 EDT 2003

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

-----Original Message-----
From: mono-devel-list-admin at lists.ximian.com
[mailto:mono-devel-list-admin at lists.ximian.com]On Behalf Of Alexander
Sent: 14 October 2003 19:49
To: Jason King
Cc: Mono-devel-list at lists.ximian.com
Subject: Re: [Mono-devel-list] Cairo and System.Drawing


System.Drawing doesn't use Cairo directly.
The glue library is inside System.Drawing source tree and is
included in the mcs build process.
If you have Cairo installed (from packages or CVS),
"make && make install prefix=..." in the mcs folder should also
build and copy the glue library to the mono library folder.

Alexandre Pigolkine

On Tue, 2003-10-14 at 18:36, Jason King wrote:
> Hello,
> I have just read the good news about Cairo being used as the only back end
> to System.Drawing.  Well done Alexandre.
> Can anybody tell me if there is any glue code needed (like in the GTK#
> packages) to use Cairo, or is it just a case of getting the latest CVS
> for system.drawing and downloading and building cairo?
> I am guessing it is the simpler option of just downloads and rebuilds.
> Thanks
> Jase
> Regards,
> 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