Clarified details regarding non-LGPL use to specify both Mono and Moonlight
[mono.git] / web / drawing
1 * Drawing
2
3         Mono provides two mechanism to draw.  The first exposes the
4         Microsoft System.Drawing API and the second exposes the <a
5         href="http://www.cairographics.org">Cairo</a> API.
6
7 * System.Drawing
8
9         The System.Drawing implementation in Mono is designed to be
10         compatible with the Microsoft API.  The imaging model is very
11         similar to the PDF 1.4 composition-based imaging model.
12
13         Our implementation is a C# wrapper around the GDI+ C API (also
14         called the <a
15         href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdicpp/GDIPlus/GDIPlusReference.asp">"GDI+
16         Flat API"</a>).
17
18         This means that the C# code is the same for Windows and Unix
19         systems.  The following graph explains the situation:
20
21         <center>
22         <img src="images/system-drawing.png">
23         </center>
24
25         In Windows Mono uses the GDI+ library that is included with
26         the operating system (<tt>GDIPLUS.DLL</tt>, while in Unix we
27         provide an implementation of this API in the
28         <tt>libgdiplus.so</tt> shared library.  Our
29         <tt>libgdiplus.so</tt> has the same C Flat API as the
30         <tt>GDIPLUS.DLL</tt>.  Our implementation uses Cairo to do
31         the heavy lifting.
32
33         The implementation of GDI+ lives in the libgdiplus cvs module
34         and requires <a
35         href="http://www.cairographics.org">Cairo</a> to be installed
36         to get the package built.
37
38         The C# code that implement System.Drawing is the same for
39         Windows and Unix builds.
40
41         Since this is an implementation of an existing Microsoft API
42         no architectural changes go here.
43
44 * Mono.Cairo
45
46         The Mono.Cairo.dll assembly exposes the Cairo API to managed
47         applications.  The mapping is a pretty straightforward one,
48         and the programming model is very close to the C API.
49
50         This API is still unstable due to the nature of the underlying
51         API being used and will be revisited as Cairo evolves.