Welcome to mirror list, hosted at ThFree Co, Russian Federation.

drawing « web - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 987301236d4f8c8470a9a79437bc24ba7716ef2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
* Drawing

	Mono provides two mechanism to draw.  The first exposes the
	Microsoft System.Drawing API and the second exposes the <a
	href="http://www.cairographics.org">Cairo</a> API.

* System.Drawing

	The System.Drawing implementation in Mono is designed to be
	compatible with the Microsoft API.  The imaging model is very
	similar to the PDF 1.4 composition-based imaging model.

	Our implementation is a C# wrapper around the GDI+ C API (also
	called the <a
	href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdicpp/GDIPlus/GDIPlusReference.asp">"GDI+
	Flat API"</a>).

	This means that the C# code is the same for Windows and Unix
	systems.  The following graph explains the situation:

	<center>
	<img src="images/system-drawing.png">
	</center>

	In Windows Mono uses the GDI+ library that is included with
	the operating system (<tt>GDIPLUS.DLL</tt>, while in Unix we
	provide an implementation of this API in the
	<tt>libgdiplus.so</tt> shared library.  Our
	<tt>libgdiplus.so</tt> has the same C Flat API as the
	<tt>GDIPLUS.DLL</tt>.  Our implementation uses Cairo to do
	the heavy lifting.

	The implementation of GDI+ lives in the libgdiplus cvs module
	and requires <a
	href="http://www.cairographics.org">Cairo</a> to be installed
	to get the package built.

	The C# code that implement System.Drawing is the same for
	Windows and Unix builds.

	Since this is an implementation of an existing Microsoft API
	no architectural changes go here.

* Mono.Cairo

	The Mono.Cairo.dll assembly exposes the Cairo API to managed
	applications.  The mapping is a pretty straightforward one,
	and the programming model is very close to the C API.

	This API is still unstable due to the nature of the underlying
	API being used and will be revisited as Cairo evolves.