… | |
… | |
684 | * MACRO DEFINES |
684 | * MACRO DEFINES |
685 | ***************************************************************************** |
685 | ***************************************************************************** |
686 | */ |
686 | */ |
687 | #define dLocal(type,name) type const name = this->name |
687 | #define dLocal(type,name) type const name = this->name |
688 | |
688 | |
689 | // for speed reasons, we assume that all latin1 characters |
689 | // for speed reasons, we assume that all codepoints 32 to 126 are |
690 | // are single-width (the first unicode combining character |
690 | // single-width. |
691 | // is actually 0x300, but ascii is what matters most). |
691 | #define WCWIDTH(c) (IN_RANGE_INC (c, 0x20, 0x7e) ? 1 : wcwidth (c)) |
692 | #define WCWIDTH(c) ((c) & ~0xff ? wcwidth (c) : 1) |
|
|
693 | |
692 | |
694 | /* convert pixel dimensions to row/column values. Everything as int32_t */ |
693 | /* convert pixel dimensions to row/column values. Everything as int32_t */ |
695 | #define Pixel2Col(x) Pixel2Width((int32_t)(x)) |
694 | #define Pixel2Col(x) Pixel2Width((int32_t)(x)) |
696 | #define Pixel2Row(y) Pixel2Height((int32_t)(y)) |
695 | #define Pixel2Row(y) Pixel2Height((int32_t)(y)) |
697 | #define Pixel2Width(x) ((int32_t)(x) / (int32_t)fwidth) |
696 | #define Pixel2Width(x) ((int32_t)(x) / (int32_t)fwidth) |