]> git.wh0rd.org - ICEs.git/blame - bfin-5624/qfontengine.i.2
more ices
[ICEs.git] / bfin-5624 / qfontengine.i.2
CommitLineData
81f80d8c
MF
1typedef unsigned char uchar;
2typedef unsigned int uint;
3typedef double qreal;
4template < typename Enum > class QFlags {
5 enum NumberFlag {
6 ShowBase = 0x1, ForcePoint = 0x2, ForceSign =
7 0x4, UppercaseBase = 0x8, UppercaseDigits = 0x10
8 };
9};
10
11class __attribute__ ((visibility("default"))) QPainterPath {
12};
13
14enum {
15 EdgeRight = 0x1, EdgeDown = 0x2, EdgeLeft = 0x4, EdgeUp = 0x8
16};
17void qt_addBitmapToPath(qreal x0, qreal y0, const uchar * image_data, int bpl,
18 int w, int h, QPainterPath * path)
19{
20 uint *grid = new uint[(w + 1) * (h + 1)];
21 for (int y = 0; y <= h; ++y) {
22 for (int x = 0; x <= w; ++x) {
23 bool topLeft =
24 (x == 0) | (y ==
25 0) ? false : (*(image_data +
26 (y - 1) * bpl +
27 ((x -
28 1) >> 3)) & (0x80 >>
29 ((x -
30 1) &
31 7)));
32 bool bottomLeft =
33 (x == 0) | (y ==
34 h) ? false : (*(image_data + (y) * bpl +
35 ((x -
36 1) >> 3)) & (0x80 >>
37 ((x -
38 1) &
39 7)));
40 if ((!bottomLeft) & topLeft)
41 grid[(y) * (w + 1) + (x)] |= EdgeLeft;
42 }
43 }
44}