6 #define W(y) rz_cons_canvas_write(c, y)
7 #define G(x, y) rz_cons_canvas_gotoxy(c, x, y)
9 #define useUtf8 (rz_cons_singleton()->use_utf8)
10 #define useUtf8Curvy (rz_cons_singleton()->use_utf8_curvy)
12 #define DOTTED_LINE_HORIZ "┄"
13 #define DOTTED_LINE_VERT "┊"
15 #define DASHED_LINE_VERT "╵"
16 #define DASHED_LINE_HORIZ "╴"
55 switch (style->
color) {
110 const char *l_corner =
"?", *rz_corner =
"?";
120 if (y +
c->sy >
c->h) {
177 l_corner = rz_corner =
".";
237 l_corner = rz_corner =
"-";
269 if (
x +
c->sx >
c->w) {
286 if (
x ==
x2 || y == y2) {
300 char chizzle[2] = { 0 };
302 int dx = abs(
x2 -
x);
303 int dy = abs(y2 - y);
305 int sx = (
x <
x2) ? 1 : -1;
306 int sy = (y < y2) ? 1 : -1;
308 int err = (dx > (dy ? dx : -dy)) / 2;
324 if ((e2 < dy) && (e2 > -dx)) {
326 *chizzle = (sx > 0) ?
'\\' :
'/';
328 *chizzle = (sx > 0) ?
'/' :
'\\';
331 if (!(
x ==
x2 && y == y2)) {
332 int i = (*chizzle ==
'_' && sy < 0) ? 1 : 0;
359 if (dy && (dx / dy) < 1) {
374 int diff_y =
RZ_ABS(y - y2);
381 int hl = diff_y / 2 - 1;
382 int hl2 = diff_y - hl;
383 int w = diff_x == 0 ? 0 : diff_x + 1;
408 int diff_y =
RZ_ABS(y - y2);
409 int min_y =
RZ_MIN(y, y2);
416 }
else if (y2 - y > 1) {
417 int h1 = 1 + bendpoint;
418 int h2 = diff_y -
h1;
419 int w = diff_x == 0 ? 0 : diff_x + 1;
438 }
else if (
x2 -
x > 1) {
439 int w1 = 1 + bendpoint;
440 int w2 = diff_x -
w1;
459 int min_x1 =
RZ_MIN(
x, xbendpoint);
460 int min_x2 =
RZ_MIN(
x2, xbendpoint);
462 int diff_x1 =
RZ_ABS(
x - xbendpoint);
463 int diff_x2 =
RZ_ABS(
x2 - xbendpoint);
465 int diff_y =
RZ_ABS((y + ybendpoint1 + 1) - (y2 - ybendpoint2 - 1));
467 int w1 = diff_x1 == 0 ? 0 : diff_x1 + 1;
468 int w2 = diff_x2 == 0 ? 0 : diff_x2 + 1;
479 int miny1 =
RZ_MIN(y, xbendpoint);
480 int miny2 =
RZ_MIN(y2, xbendpoint);
481 int diff_y1 =
RZ_ABS(y - xbendpoint);
482 int diff_y2 =
RZ_ABS(y2 - xbendpoint);
RZ_API void rz_cons_canvas_line(RzConsCanvas *c, int x, int y, int x2, int y2, RzCanvasLineStyle *style)
static char * utf8_line_vert(int dot_style)
static char * utf8_line_horiz(int dot_style)
RZ_API void rz_cons_canvas_line_square_defined(RzConsCanvas *c, int x, int y, int x2, int y2, RzCanvasLineStyle *style, int bendpoint, int isvert)
static void apply_line_style(RzConsCanvas *c, int x, int y, int x2, int y2, RzCanvasLineStyle *style, int isvert)
RZ_API void rz_cons_canvas_line_square(RzConsCanvas *c, int x, int y, int x2, int y2, RzCanvasLineStyle *style)
#define DOTTED_LINE_HORIZ
static void draw_horizontal_line(RzConsCanvas *c, int x, int y, int width, int style, int dot_style)
static void draw_vertical_line(RzConsCanvas *c, int x, int y, int height, int dot_style)
RZ_API void rz_cons_canvas_line_diagonal(RzConsCanvas *c, int x, int y, int x2, int y2, RzCanvasLineStyle *style)
#define DASHED_LINE_HORIZ
RZ_API void rz_cons_canvas_line_back_edge(RzConsCanvas *c, int x, int y, int x2, int y2, RzCanvasLineStyle *style, int ybendpoint1, int xbendpoint, int ybendpoint2, int isvert)
RZ_API RzCons * rz_cons_singleton(void)
RZ_API void rz_cons_break_pop(void)
RZ_API void rz_cons_break_push(RzConsBreak cb, void *user)
RZ_API bool rz_cons_is_breaked(void)
v0.v4.v8.v15.v3.v30.v14.v1. h2
#define DOT_STYLE_CONDITIONAL
#define RUNECODESTR_CURVE_CORNER_TL
#define RUNECODESTR_LINE_HORIZ
#define RUNECODESTR_CORNER_BL
#define DOT_STYLE_BACKEDGE
#define RUNECODESTR_CORNER_TL
#define RUNECODESTR_CORNER_BR
#define RUNECODESTR_CURVE_CORNER_BL
#define RUNECODESTR_CORNER_TR
#define RUNECODESTR_CURVE_CORNER_TR
#define RUNECODESTR_CURVE_CORNER_BR
#define RUNECODESTR_LINE_VERT
RzConsPrintablePalette pal