annotate src/paint.c @ 52:59a295651480

Add action mb_chgcolor_t to change color of paints.
author Thinker K.F. Li <thinker@branda.to>
date Sat, 09 Aug 2008 22:16:23 +0800
parents 56f592f56ff7
children 01ed2bc37eed
rev   line source
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
1 #include <stdio.h>
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
2 #include <stdlib.h>
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
3 #include <cairo.h>
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
4 #include "paint.h"
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
5
23
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
6 /*! \brief Solid color paint.
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
7 */
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
8 typedef struct _paint_color {
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
9 paint_t paint;
21
83d24300a992 opacity (alpha) channel
Thinker K.F. Li <thinker@branda.to>
parents: 19
diff changeset
10 co_comp_t r, g, b, a;
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
11 redraw_man_t *rdman;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
12 } paint_color_t;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
13
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
14
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
15 static void paint_color_prepare(paint_t *paint, cairo_t *cr) {
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
16 paint_color_t *color = (paint_color_t *)paint;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
17
21
83d24300a992 opacity (alpha) channel
Thinker K.F. Li <thinker@branda.to>
parents: 19
diff changeset
18 cairo_set_source_rgba(cr, color->r, color->g, color->b, color->a);
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
19 }
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
20
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
21 static void paint_color_free(paint_t *paint) {
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
22 paint_color_t *color = (paint_color_t *)paint;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
23
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
24 shnode_list_free(color->rdman, paint->members);
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
25 free(paint);
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
26 }
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
27
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
28 paint_t *paint_color_new(redraw_man_t *rdman,
21
83d24300a992 opacity (alpha) channel
Thinker K.F. Li <thinker@branda.to>
parents: 19
diff changeset
29 co_comp_t r, co_comp_t g,
83d24300a992 opacity (alpha) channel
Thinker K.F. Li <thinker@branda.to>
parents: 19
diff changeset
30 co_comp_t b, co_comp_t a) {
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
31 paint_color_t *color;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
32
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
33 color = (paint_color_t *)malloc(sizeof(paint_color_t));
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
34 if(color == NULL)
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
35 return NULL;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
36 color->rdman = rdman;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
37 color->r = r;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
38 color->g = g;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
39 color->b = b;
21
83d24300a992 opacity (alpha) channel
Thinker K.F. Li <thinker@branda.to>
parents: 19
diff changeset
40 color->a = a;
19
cf6d65398619 More animation demo
Thinker K.F. Li <thinker@branda.to>
parents: 18
diff changeset
41 paint_init(&color->paint, paint_color_prepare, paint_color_free);
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
42 return (paint_t *)color;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
43 }
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
44
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
45 void paint_color_set(paint_t *paint,
21
83d24300a992 opacity (alpha) channel
Thinker K.F. Li <thinker@branda.to>
parents: 19
diff changeset
46 co_comp_t r, co_comp_t g,
83d24300a992 opacity (alpha) channel
Thinker K.F. Li <thinker@branda.to>
parents: 19
diff changeset
47 co_comp_t b, co_comp_t a) {
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
48 paint_color_t *color = (paint_color_t *)paint;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
49
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
50 color->r = r;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
51 color->g = g;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
52 color->b = b;
21
83d24300a992 opacity (alpha) channel
Thinker K.F. Li <thinker@branda.to>
parents: 19
diff changeset
53 color->a = a;
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
54 }
23
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
55
52
59a295651480 Add action mb_chgcolor_t to change color of paints.
Thinker K.F. Li <thinker@branda.to>
parents: 23
diff changeset
56 void paint_color_get(paint_t *paint,
59a295651480 Add action mb_chgcolor_t to change color of paints.
Thinker K.F. Li <thinker@branda.to>
parents: 23
diff changeset
57 co_comp_t *r, co_comp_t *g,
59a295651480 Add action mb_chgcolor_t to change color of paints.
Thinker K.F. Li <thinker@branda.to>
parents: 23
diff changeset
58 co_comp_t *b, co_comp_t *a) {
59a295651480 Add action mb_chgcolor_t to change color of paints.
Thinker K.F. Li <thinker@branda.to>
parents: 23
diff changeset
59 paint_color_t *color = (paint_color_t *)paint;
59a295651480 Add action mb_chgcolor_t to change color of paints.
Thinker K.F. Li <thinker@branda.to>
parents: 23
diff changeset
60
59a295651480 Add action mb_chgcolor_t to change color of paints.
Thinker K.F. Li <thinker@branda.to>
parents: 23
diff changeset
61 *r = color->r;
59a295651480 Add action mb_chgcolor_t to change color of paints.
Thinker K.F. Li <thinker@branda.to>
parents: 23
diff changeset
62 *g = color->g;
59a295651480 Add action mb_chgcolor_t to change color of paints.
Thinker K.F. Li <thinker@branda.to>
parents: 23
diff changeset
63 *b = color->b;
59a295651480 Add action mb_chgcolor_t to change color of paints.
Thinker K.F. Li <thinker@branda.to>
parents: 23
diff changeset
64 *a = color->a;
59a295651480 Add action mb_chgcolor_t to change color of paints.
Thinker K.F. Li <thinker@branda.to>
parents: 23
diff changeset
65 }
59a295651480 Add action mb_chgcolor_t to change color of paints.
Thinker K.F. Li <thinker@branda.to>
parents: 23
diff changeset
66
23
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
67 /*! \brief Linear gradient.
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
68 */
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
69 typedef struct _paint_linear {
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
70 paint_t paint;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
71 co_aix x1, y1;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
72 co_aix x2, y2;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
73 int n_stops;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
74 grad_stop_t *stops;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
75 int flags;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
76 cairo_pattern_t *ptn;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
77 } paint_linear_t;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
78
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
79 #define LIF_DIRTY 0x1
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
80
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
81 static void paint_linear_prepare(paint_t *paint, cairo_t *cr) {
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
82 paint_linear_t *linear = (paint_linear_t *)paint;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
83 cairo_pattern_t *ptn;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
84 grad_stop_t *stop;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
85 int i;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
86
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
87 ptn = linear->ptn;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
88 if(linear->flags & LIF_DIRTY) {
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
89 if(ptn)
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
90 cairo_pattern_destroy(ptn);
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
91 linear->flags &= ~LIF_DIRTY;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
92 ptn = cairo_pattern_create_linear(linear->x1, linear->y1,
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
93 linear->x2, linear->y2);
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
94 for(i = 0; i < linear->n_stops; i++) {
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
95 stop = &linear->stops[i];
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
96 cairo_pattern_add_color_stop_rgba(ptn, stop->offset,
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
97 stop->r, stop->g, stop->b,
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
98 stop->a);
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
99 }
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
100 linear->ptn = ptn;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
101 }
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
102
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
103 cairo_set_source(cr, ptn);
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
104 }
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
105
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
106 static void paint_linear_free(paint_t *paint) {
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
107 paint_linear_t *linear = (paint_linear_t *)paint;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
108
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
109 if(linear->ptn)
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
110 cairo_pattern_destroy(linear->ptn);
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
111 free(paint);
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
112 }
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
113
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
114 paint_t *paint_linear_new(redraw_man_t *rdman,
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
115 co_aix x1, co_aix y1, co_aix x2, co_aix y2) {
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
116 paint_linear_t *linear;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
117
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
118 linear = (paint_linear_t *)malloc(sizeof(paint_linear_t));
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
119 if(linear == NULL)
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
120 return NULL;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
121
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
122 paint_init(&linear->paint, paint_linear_prepare, paint_linear_free);
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
123
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
124 linear->x1 = x1;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
125 linear->y1 = y1;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
126 linear->x2 = x2;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
127 linear->y2 = y2;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
128 linear->n_stops = 0;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
129 linear->stops = NULL;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
130 linear->flags = LIF_DIRTY;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
131 linear->ptn = NULL;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
132
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
133 return (paint_t *)linear;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
134 }
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
135
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
136 grad_stop_t *paint_linear_stops(paint_t *paint,
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
137 int n_stops,
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
138 grad_stop_t *stops) {
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
139 paint_linear_t *linear = (paint_linear_t *)paint;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
140 grad_stop_t *old_stops;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
141
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
142 old_stops = linear->stops;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
143 linear->n_stops = n_stops;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
144 linear->stops = stops;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
145 return old_stops;
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
146 }
56f592f56ff7 Fix bug and add linear gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents: 21
diff changeset
147