more ices
[ICEs.git] / bfin-5624 / qfontengine.i
1 void qt_addBitmapToPath(const unsigned char * image_data, int bpl, int w, int h)
2 {
3 unsigned int *grid = new unsigned int[(w + 1) * (h + 1)];
4 for (int y = 0; y <= h; ++y) {
5 for (int x = 0; x <= w; ++x) {
6 bool topLeft = (x == 0) | (y == 0) ? false :
7 *(image_data + (y - 1) * bpl + ((x - 1) >> 3)) & (0x80 >> ((x - 1) & 7));
8 bool bottomLeft = (x == 0) | (y == h) ? false :
9 *(image_data + (y - 0) * bpl + ((x - 1) >> 3)) & (0x80 >> ((x - 1) & 7));
10 if (!bottomLeft & topLeft)
11 grid[y * (w + 1) + x] |= 4;
12 }
13 }
14 }