README
1
2ABClock version 1.0
3===================
4
5
6How to use the library abclib
7-----------------------------
8
9
10Include the abclib header:
11
12 #include "abclib.h"
13
14
15To create the clock, call this function:
16
17 void ABC_Make (int hour, int min, int sec, int width, int height, int border)
18
19 ABC_Make will clear the area before making the clock
20
21 If (border < 0) then a default border margin will be used
22 appropriate for the size of the clock, otherwise, a fixed
23 border margin will be used
24
25 If (border < 0) then width and height should not be smaller
26 than ABC_MINSIZE
27
28 If (border >= 0) then width and height should not be smaller
29 than ABC_MINSIZE + 2 * border
30
31
32Your code should define the following two functions:
33
34 void ABC_SetColor (int color)
35
36 ABC_SetColor should set the colour to be used in subsequent
37 calls to ABC_Rect
38 The color argument is one of:
39 0 - background colour
40 1 - inside colour of square
41 2 - square border colour
42 3 - hour colour
43 4 - minute colour
44 As defaults, you should use standard background colour for
45 (color < 2), and standard foreground colour otherwise
46
47
48 void ABC_Rect (int x1, int y1, int x2, int y2)
49
50 ABC_Rect should fill the rectangle from lower left (x1, y1) to
51 upper right (x2, y2) inclusive, in the colour set by
52 ABC_SetColor.
53 If (x1 > x2 || y1 > y2) the function should do nothing.
54
55
56------------------------------------
57Peter Kleiweg
58http://www.let.rug.nl/~kleiweg/
59