Subversion Repositories programming

Rev

Rev 313 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 313 Rev 317
Line 1... Line -...
1
Documentation for the libggi-based draw library
-
 
2
================================================================================
1
================================================================================
-
 
2
=            Documentation for the libggi-based draw library                   =
-
 
3
================================================================================
-
 
4
 
3
 
5
 
4
Requirements to use the draw library:
6
Requirements to use the draw library:
5
1. Install libggi
7
1. Install libggi
6
 
8
 
-
 
9
 
7
Installing ggi from rpm's: (SuSE, CentOS, Red Hat, etc)
10
Installing ggi from rpm's: (SuSE, CentOS, Red Hat, etc)
8
============================================================
11
============================================================
-
 
12
As root, run something similar to the following:
-
 
13
 
9
rpm -ivh libgii-0.9.2-1su100.i586.rpm libgii-devel-0.9.2-1su100.i586.rpm
14
rpm -ivh libgii-0.9.2-1su100.i586.rpm libgii-devel-0.9.2-1su100.i586.rpm
10
rpm -ivh libggi-2.1.2-1su100.i586.rpm libggi-devel-2.1.2-1su100.i586.rpm
15
rpm -ivh libggi-2.1.2-1su100.i586.rpm libggi-devel-2.1.2-1su100.i586.rpm
11
 
16
 
-
 
17
 
12
Installing ggi from ebuild: (Gentoo)
18
Installing ggi from ebuild: (Gentoo)
13
============================================================
19
============================================================
14
emerge libggi
20
USE="fbcon" emerge libggi
-
 
21
 
15
 
22
 
-
 
23
Installing ggi from deb: (Debian)
-
 
24
============================================================
-
 
25
apt-get install libggi2
-
 
26
apt-get install libggi-target-fbdev
16
 
27
 
-
 
28
 
-
 
29
 
-
 
30
 
-
 
31
 
-
 
32
================================================================================
17
How to compile:
33
=                             How to compile:                                  =
18
================================================================================
34
================================================================================
19
 
35
 
-
 
36
 
-
 
37
All Code:
-
 
38
============================================================
-
 
39
Copy draw.h and draw.c into your source folder.
-
 
40
#include "draw.h" in your source code.
-
 
41
When you compile your program, include draw.c in the compile command.
-
 
42
(See draw_test.c and draw_test.cpp for examples)
-
 
43
 
-
 
44
 
20
C Code:
45
C Code:
21
============================================================
46
============================================================
22
gcc draw.c your_prog.c -lggi -o your_prog
47
gcc draw.c your_prog.c -lggi -o your_prog
23
 
48
 
-
 
49
 
24
C++ Code:
50
C++ Code:
25
============================================================
51
============================================================
26
g++ draw.c your_prog.cpp -lggi -o your_prog
52
g++ draw.c your_prog.cpp -lggi -o your_prog
27
 
53
 
28
 
54
 
29
Functions supported by the draw library:
55
Test Programs: (included with this distrobution)
-
 
56
============================================================
-
 
57
cd /path/to/draw
-
 
58
make
-
 
59
 
-
 
60
 
-
 
61
 
-
 
62
 
-
 
63
 
30
================================================================================
64
================================================================================
-
 
65
=               Functions supported by the draw library:                       =
-
 
66
================================================================================
-
 
67
 
31
 
68
 
32
Colors:
69
Colors:
33
============================================================
70
============================================================
34
BLACK
71
BLACK
35
AQUA
72
AQUA
Line 50... Line 87...
50
 
87
 
51
These can be used anywhere where a color is required. They are defined in
88
These can be used anywhere where a color is required. They are defined in
52
draw.h for you. Note that you can also use integer numbers to represent
89
draw.h for you. Note that you can also use integer numbers to represent
53
these colors. You can find out the correspondence by looking in draw.h.
90
these colors. You can find out the correspondence by looking in draw.h.
54
 
91
 
-
 
92
 
55
Functions:
93
Functions:
56
============================================================
94
============================================================
57
draw_init ()
95
draw_init ()
58
    This function must be called at the beginning of the program
96
    This function must be called at the beginning of the program
59
    in order to setup the screen for rendering.
97
    in order to setup the screen for rendering.