flush
[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 "GDI+ Flat API").  
15
16         <center>
17         <img src="images/system-drawing.png">
18         </center>
19
20         In Windows Mono uses the GDI+ library that is included
21         with the operating system, while in Unix we provide an
22         implementation of this API which uses Cairo to do the heavy
23         lifting. 
24
25         The implementation of GDI+ lives in mcs/class/System.Drawing
26         in the gdiplus directory and requires <a
27         href="http://www.cairographics.org">Cairo</a> to be installed
28         to get the package built.
29
30         The C# code that implement System.Drawing is the same for
31         Windows and Unix builds.
32
33         Since this is an implementation of an existing Microsoft API
34         no architectural changes go here.
35
36 * Mono.Cairo
37
38         The Mono.Cairo.dll assembly exposes the Cairo API to managed
39         applications.  The mapping is a pretty straightforward one,
40         and the programming model is very close to the C API.
41
42         This API is still unstable due to the nature of the underlying
43         API being used and will be revisited as Cairo evolves.