X-Git-Url: https://git.wh0rd.org/?p=ICEs.git;a=blobdiff_plain;f=bfin-5624%2Fqfontengine.i.2;fp=bfin-5624%2Fqfontengine.i.2;h=ce52565f6d808d9333dd2aa9e577e4c92ee8b2f1;hp=0000000000000000000000000000000000000000;hb=81f80d8c1c9898ae1c26534a3287a47220390f5c;hpb=45516216fc552c838e650d868214d867027a64f6 diff --git a/bfin-5624/qfontengine.i.2 b/bfin-5624/qfontengine.i.2 new file mode 100644 index 0000000..ce52565 --- /dev/null +++ b/bfin-5624/qfontengine.i.2 @@ -0,0 +1,44 @@ +typedef unsigned char uchar; +typedef unsigned int uint; +typedef double qreal; +template < typename Enum > class QFlags { + enum NumberFlag { + ShowBase = 0x1, ForcePoint = 0x2, ForceSign = + 0x4, UppercaseBase = 0x8, UppercaseDigits = 0x10 + }; +}; + +class __attribute__ ((visibility("default"))) QPainterPath { +}; + +enum { + EdgeRight = 0x1, EdgeDown = 0x2, EdgeLeft = 0x4, EdgeUp = 0x8 +}; +void qt_addBitmapToPath(qreal x0, qreal y0, const uchar * image_data, int bpl, + int w, int h, QPainterPath * path) +{ + uint *grid = new uint[(w + 1) * (h + 1)]; + for (int y = 0; y <= h; ++y) { + for (int x = 0; x <= w; ++x) { + bool topLeft = + (x == 0) | (y == + 0) ? false : (*(image_data + + (y - 1) * bpl + + ((x - + 1) >> 3)) & (0x80 >> + ((x - + 1) & + 7))); + bool bottomLeft = + (x == 0) | (y == + h) ? false : (*(image_data + (y) * bpl + + ((x - + 1) >> 3)) & (0x80 >> + ((x - + 1) & + 7))); + if ((!bottomLeft) & topLeft) + grid[(y) * (w + 1) + (x)] |= EdgeLeft; + } + } +}