diff options
| -rw-r--r-- | box-drawing.c | 142 |
1 files changed, 109 insertions, 33 deletions
diff --git a/box-drawing.c b/box-drawing.c index 686d5b77..85a2d4be 100644 --- a/box-drawing.c +++ b/box-drawing.c @@ -2151,144 +2151,232 @@ draw_wedge_triangle(struct buf *buf, wchar_t wc) p1_y = 2 * height / 3; p2_y = p3_y = height; break; + case 0x1fb52: /* ๐ญ */ + p1_x = p2_x = 0; p3_x = round(width_f / 2.); + p1_y = round(2. * height_f / 3.); p2_y = p3_y = height; + break; + case 0x1fb3d: /* ๐ฌฝ */ p1_x = p2_x = 0; p3_x = width; p1_y = 2 * height / 3; p2_y = p3_y = height; break; + case 0x1fb53: /* ๐ญ */ + p1_x = p2_x = 0; p3_x = width; + p1_y = round(2. * height_f / 3.); p2_y = p3_y = height; + break; + case 0x1fb3e: /* ๐ฌพ */ p1_x = p2_x = 0; p3_x = round(width_f / 2.); p1_y = height / 3; p2_y = p3_y = height; break; + case 0x1fb54: /* ๐ญ */ + p1_x = p2_x = 0; p3_x = round(width_f / 2.); + p1_y = round(height_f / 3.); p2_y = p3_y = height; + break; + case 0x1fb3f: /* ๐ฌฟ */ p1_x = p2_x = 0; p3_x = width; p1_y = height / 3; p2_y = p3_y = height; break; + case 0x1fb55: /* ๐ญ */ + p1_x = p2_x = 0; p3_x = width; + p1_y = round(height_f / 3.); p2_y = p3_y = height; + break; + case 0x1fb40: /* ๐ญ */ + case 0x1fb56: /* ๐ญ */ p1_x = p2_x = 0; p3_x = round(width_f / 2.); p1_y = 0; p2_y = p3_y = height; break; - case 0x1fb47: /* ๐ญ */ + case 0x1fb47: /* ๐ญ */ p1_x = p2_x = width; p3_x = width / 2; p1_y = 2 * height / 3; p2_y = p3_y = height; break; - case 0x1fb48: /* ๐ญ */ + case 0x1fb5d: /* ๐ญ */ + p1_x = p2_x = width; p3_x = width / 2; + p1_y = round(2. * height_f / 3.); p2_y = p3_y = height; + break; + + case 0x1fb48: /* ๐ญ */ p1_x = p2_x = width; p3_x = 0; p1_y = 2 * height / 3; p2_y = p3_y = height; break; - case 0x1fb49: /* ๐ญ */ + case 0x1fb5e: /* ๐ญ */ + p1_x = p2_x = width; p3_x = 0; + p1_y = round(2. * height_f / 3.); p2_y = p3_y = height; + break; + + case 0x1fb49: /* ๐ญ */ p1_x = p2_x = width; p3_x = width / 2; p1_y = height / 3; p2_y = p3_y = height; break; - case 0x1fb4a: /* ๐ญ */ + case 0x1fb5f: /* ๐ญ */ + p1_x = p2_x = width; p3_x = width / 2; + p1_y = round(height_f / 3.); p2_y = p3_y = height; + break; + + case 0x1fb4a: /* ๐ญ */ p1_x = p2_x = width; p3_x = 0; p1_y = height / 3; p2_y = p3_y = height; break; - case 0x1fb4b: /* ๐ญ */ + case 0x1fb60: /* ๐ญ */ + p1_x = p2_x = width; p3_x = 0; + p1_y = round(height_f / 3.); p2_y = p3_y = height; + break; + + case 0x1fb4b: /* ๐ญ */ + case 0x1fb61: /* ๐ญก */ p1_x = p2_x = width; p3_x = width / 2; p1_y = 0; p2_y = p3_y = height; break; - case 0x1fb57: /* ๐ญ */ + case 0x1fb57: /* ๐ญ */ p1_x = p2_x = 0; p3_x = round(width_f / 2.); p1_y = p3_y = 0; p2_y = round(height_f / 3.); break; - case 0x1fb58: /* ๐ญ */ + case 0x1fb41: /* ๐ญ */ + p1_x = p2_x = 0; p3_x = round(width_f / 2.); + p1_y = p3_y = 0; p2_y = height / 3; + break; + + case 0x1fb58: /* ๐ญ */ p1_x = p2_x = 0; p3_x = width; p1_y = p3_y = 0; p2_y = round(height_f / 3.); break; - case 0x1fb59: /* ๐ญ */ + case 0x1fb42: /* ๐ญ */ + p1_x = p2_x = 0; p3_x = width; + p1_y = p3_y = 0; p2_y = height / 3; + break; + + case 0x1fb59: /* ๐ญ */ p1_x = p2_x = 0; p3_x = round(width_f / 2.); p1_y = p3_y = 0; p2_y = round(2. * height_f / 3.); break; - case 0x1fb5a: /* ๐ญ */ + case 0x1fb43: /* ๐ญ */ + p1_x = p2_x = 0; p3_x = round(width_f / 2.); + p1_y = p3_y = 0; p2_y = 2 * height / 3; + break; + + case 0x1fb5a: /* ๐ญ */ p1_x = p2_x = 0; p3_x = width; p1_y = p3_y = 0; p2_y = round(2. * height_f / 3.); break; - case 0x1fb5b: /* ๐ญ */ + case 0x1fb44: /* ๐ญ */ + p1_x = p2_x = 0; p3_x = width; + p1_y = p3_y = 0; p2_y = 2 * height / 3; + break; + + case 0x1fb5b: /* ๐ญ */ + case 0x1fb45: /* ๐ญ
*/ p1_x = p2_x = 0; p3_x = round(width_f / 2.); p1_y = p3_y = 0; p2_y = height; break; - case 0x1fb62: /* ๐ญข */ + case 0x1fb62: /* ๐ญข */ p1_x = p2_x = width; p3_x = width / 2; p1_y = p3_y = 0; p2_y = round(height_f / 3.); break; + case 0x1fb4c: /* ๐ญ */ + p1_x = p2_x = width; p3_x = width / 2; + p1_y = p3_y = 0; p2_y = height / 3; + break; + case 0x1fb63: /* ๐ญฃ */ p1_x = p2_x = width; p3_x = 0; p1_y = p3_y = 0; p2_y = round(height_f / 3.); break; - case 0x1fb64: /* ๐ญค */ + case 0x1fb4d: /* ๐ญ */ + p1_x = p2_x = width; p3_x = 0; + p1_y = p3_y = 0; p2_y = height / 3; + break; + + case 0x1fb64: /* ๐ญค */ p1_x = p2_x = width; p3_x = width / 2; p1_y = p3_y = 0; p2_y = round(2. * height_f / 3.); break; - case 0x1fb65: /* ๐ญฅ */ + case 0x1fb4e: /* ๐ญ */ + p1_x = p2_x = width; p3_x = width / 2; + p1_y = p3_y = 0; p2_y = 2 * height / 3; + break; + + case 0x1fb65: /* ๐ญฅ */ p1_x = p2_x = width; p3_x = 0; p1_y = p3_y = 0; p2_y = round(2. * height_f / 3.); break; + case 0x1fb4f: /* ๐ญ */ + p1_x = p2_x = width; p3_x = 0; + p1_y = p3_y = 0; p2_y = 2 * height / 3; + break; + case 0x1fb66: /* ๐ญฆ */ + case 0x1fb50: /* ๐ญ */ p1_x = p2_x = width; p3_x = width / 2; p1_y = p3_y = 0; p2_y = height; break; - case 0x1fb46: /* ๐ญ */ + case 0x1fb46: /* ๐ญ */ p1_x = 0; p1_y = round(2. * height_f / 3.); p2_x = width; p2_y = height / 3; p3_x = width; p3_y = p1_y; break; - case 0x1fb51: /* ๐ญ */ + case 0x1fb51: /* ๐ญ */ p1_x = 0; p1_y = height / 3; p2_x = 0; p2_y = round(2. * height_f / 3.); p3_x = width; p3_y = p2_y; break; - case 0x1fb5c: /* ๐ญ */ + case 0x1fb5c: /* ๐ญ */ p1_x = 0; p1_y = height / 3; p2_x = 0; p2_y = round(2. * height_f / 3.); p3_x = width; p3_y = p1_y; break; - case 0x1fb67: /* ๐ญง */ + case 0x1fb67: /* ๐ญง */ p1_x = 0; p1_y = height / 3; p2_x = width; p2_y = p1_y; p3_x = width; p3_y = round(2. * height_f / 3.); break; - case 0x1fb6c: /* ๐ญฌ */ + case 0x1fb6c: /* ๐ญฌ */ + case 0x1fb68: /* ๐ญจ */ p1_x = 0; p1_y = 0; p2_x = round(width_f / 2.); p2_y = round(height_f / 2.); p3_x = 0; p3_y = height; break; - case 0x1fb6d: /* ๐ญญ */ + case 0x1fb6d: /* ๐ญญ */ + case 0x1fb69: /* ๐ญฉ */ p1_x = 0; p1_y = 0; p2_x = width / 2; p2_y = round(height_f / 2.); p3_x = width; p3_y = 0; break; - case 0x1fb6e: /* ๐ญฎ */ + case 0x1fb6e: /* ๐ญฎ */ + case 0x1fb6a: /* ๐ญช */ p1_x = width; p1_y = 0; p2_x = width / 2; p2_y = round(height_f / 2.); p3_x = width; p3_y = height; break; - case 0x1fb6f: /* ๐ญฏ */ + case 0x1fb6f: /* ๐ญฏ */ + case 0x1fb6b: /* ๐ญซ */ p1_x = 0; p1_y = height; p2_x = width / 2; p2_y = round(height_f / 2.); p3_x = width; p3_y = height; @@ -2314,18 +2402,6 @@ draw_wedge_triangle(struct buf *buf, wchar_t wc) static void draw_wedge_triangle_inverted(struct buf *buf, wchar_t wc) { - IGNORE_WARNING("-Wpedantic"); - - switch (wc) { - case 0x1fb41 ... 0x1fb45: wc = wc - 0x1fb41 + 0x1fb57; break; - case 0x1fb4c ... 0x1fb50: wc = wc - 0x1fb4c + 0x1fb62; break; - case 0x1fb52 ... 0x1fb56: wc = wc - 0x1fb52 + 0x1fb3c; break; - case 0x1fb5d ... 0x1fb61: wc = wc - 0x1fb5d + 0x1fb47; break; - case 0x1fb68 ... 0x1fb6b: wc = wc - 0x1fb68 + 0x1fb6c; break; - } - - UNIGNORE_WARNINGS; - draw_wedge_triangle(buf, wc); pixman_image_t *src = pixman_image_create_solid_fill(&white); |
