取得汉字的笔画的源码(2)
下面是个取得汉字的笔画的源码(2)教程,撑握了其技术要点,学起来就简单多了。赶紧跟着图老师小编一起来看看吧!
// 取得汉字的笔画
/*
gb2312_stkcnt.cpp
Retrieve the stroke count of Chinese character.
Support GB2312_80.
Chunhua Liu
Last updated: 2001-11-22/1500
*/
/* D6 */
9, 10, 8, 7, 6, 8, 4, 7,
14, 8, 8, 10, 5, 3, 8, 11,
8, 12, 12, 6, 10, 8, 7, 9,
4, 11, 5, 6, 7, 7, 10, 11,
6, 10, 13, 8, 9, 8, 12, 10,
13, 8, 8, 11, 12, 8, 11, 4,
9, 8, 9, 10, 8, 9, 8, 9,
6, 6, 6, 8, 6, 9, 7, 12,
9, 7, 8, 8, 10, 8, 9, 17,
10, 10, 12, 6, 11, 10, 8, 10,
6, 10, 12, 8, 17, 15, 5, 11,
9, 7, 11, 8, 12, 12,
/* D7 */
7, 8, 9, 8, 7, 4, 9, 4,
9, 8, 15, 14, 15, 10, 6, 12,
6, 15, 6, 7, 12, 13, 9, 14,
7, 11, 10, 10, 10, 8, 8, 10,
12, 8, 10, 11, 11, 7, 9, 9,
9, 10, 9, 12, 11, 7, 12, 5,
9, 13, 3, 6, 11, 6, 18, 12,
15, 8, 11, 9, 7, 7, 7, 9,
12, 10, 7, 8, 11, 9, 7, 7,
8, 10, 20, 16, 15, 12, 13, 12,
15, 9, 5, 7, 9, 11, 7, 7,
10, 0, 0, 0, 0, 0,
/* D8 */
3, 3, 3, 4, 4, 4, 5, 6,
6, 10, 10, 16, 1, 8, 1, 2,
3, 4, 4, 5, 5, 6, 9, 11,
14, 14, 19, 1, 8, 14, 2, 6,
4, 7, 7, 11, 14, 4, 6, 10,
11, 12, 14, 15, 16, 2, 5, 8,
11, 11, 15, 8, 7, 2, 4, 6,
7, 8, 8, 8, 9, 10, 10, 10,
13, 13, 14, 14, 15, 16, 2, 8,
2, 4, 4, 4, 5, 5, 5, 5,
6, 6, 6, 6, 6, 6, 6, 6,
6, 7, 7, 7, 7, 7,
/* D9 */
7, 7, 7, 7, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8,
9, 9, 9, 9, 9, 9, 9, 9,
9, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 11, 11,
11, 11, 11, 11, 11, 12, 12, 12,
13, 14, 14, 14, 14, 14, 14, 15,
15, 5, 6, 7, 7, 9, 17, 6,
8, 4, 12, 16, 17, 18, 21, 2,
9, 9, 11, 6, 6, 7, 2, 8,
10, 10, 11, 12, 12, 12, 13, 16,
19, 19, 2, 6, 8, 8,
/* DA */
10, 2, 10, 10, 2, 5, 5, 5,
6, 6, 6, 7, 7, 7, 7, 7,
7, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 9, 9, 9, 9,
10, 10, 10, 10, 10, 10, 10, 11,
11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 12, 12, 12, 12, 12, 13,
13, 14, 14, 14, 15, 15, 19, 2,
8, 2, 5, 5, 6, 6, 7, 7,
7, 7, 8, 9, 9, 10, 10, 10,
11, 11, 11, 16, 5, 5, 5, 5,
6, 6, 7, 7, 7, 7,
/* DB */
7, 7, 8, 8, 8, 8, 8, 8,
8, 9, 9, 9, 9, 9, 10, 10,
11, 11, 13, 13, 13, 14, 14, 16,
19, 17, 5, 7, 5, 7, 7, 8,
10, 10, 11, 15, 9, 17, 20, 2,
2, 6, 10, 2, 5, 10, 12, 7,
9, 9, 14, 16, 16, 17, 6, 6,
6, 6, 6, 6, 6, 7, 7, 7,
8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 9, 9, 9, 9, 9, 9,
9, 9, 9, 10, 10, 10, 10, 10,
10, 11, 11, 11, 11, 11,
/* DC */
11, 11, 11, 11, 11, 12, 12, 12,
12, 13, 13, 14, 14, 14, 15, 20,
21, 22, 3, 5, 5, 6, 6, 6,
6, 6, 6, 6, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9,
/* DD */
9, 9, 9, 9, 9, 9, 9, 10,
10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10