| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e5e44ca commit 2dff3b5
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -516,6 +516,7 @@ static int SIXEL_ncol = 16; /* actual number of colors to be used */ | |||
| 516 | 516 | static int SIXEL_lt; | |
| 517 | 517 | static int SIXEL_fp = 0; /* start of gnuplot palette colors */ | |
| 518 | 518 | static int SIXEL_np = 0; /* size of gnuplot palette */ | |
| 519 | + static int SIXEL_anchor = 0; /* Anchor plot at top left */ | ||
| 519 | 520 | ||
| 520 | 521 | struct SIXEL_colorspec { | |
| 521 | 522 | int state; /* see definitions above */ | |
@@ -579,7 +580,7 @@ SIXEL_findslot(int rgbval) | |||
| 579 | 580 | enum SIXEL_id { | |
| 580 | 581 | SIXEL_SMALL, SIXEL_MEDIUM, SIXEL_LARGE, | |
| 581 | 582 | SIXEL_MONOCHROME, SIXEL_COLOR, SIXEL_COLORS, | |
| 582 | - SIXEL_SIZE, | ||
| 583 | + SIXEL_SIZE, SIXEL_ANIMATE, SIXEL_SCROLL, | ||
| 583 | 584 | SIXEL_OTHER | |
| 584 | 585 | }; | |
| 585 | 586 | ||
@@ -593,6 +594,8 @@ static struct gen_table SIXEL_opts[] = | |||
| 593 | 594 | { "c$olour", SIXEL_COLOR }, | |
| 594 | 595 | { "colors", SIXEL_COLORS }, | |
| 595 | 596 | { "size", SIXEL_SIZE }, | |
| 597 | + { "animate", SIXEL_ANIMATE }, | ||
| 598 | + { "scroll", SIXEL_SCROLL }, | ||
| 596 | 599 | { NULL, SIXEL_OTHER } | |
| 597 | 600 | }; | |
| 598 | 601 | ||
@@ -643,9 +646,17 @@ SIXEL_options() | |||
| 643 | 646 | } | |
| 644 | 647 | break; | |
| 645 | 648 | } | |
| 649 | + case SIXEL_ANIMATE: | ||
| 650 | + SIXEL_anchor = 1; | ||
| 651 | + c_token++; | ||
| 652 | + break; | ||
| 653 | + case SIXEL_SCROLL: | ||
| 654 | + SIXEL_anchor = 0; | ||
| 655 | + c_token++; | ||
| 656 | + break; | ||
| 646 | 657 | case SIXEL_OTHER: | |
| 647 | 658 | default: | |
| 648 | - int_error(c_token, "unknown option; expecting: {small, medium, large}, {monochrome, color}, or {size x,y}"); | ||
| 659 | + int_warn(c_token, "unknown terminal option"); | ||
| 649 | 660 | break; | |
| 650 | 661 | } | |
| 651 | 662 | } | |
@@ -671,6 +682,8 @@ SIXEL_options() | |||
| 671 | 682 | strcat(term_options, " monochrome"); | |
| 672 | 683 | else | |
| 673 | 684 | sprintf(term_options + strlen(term_options), " colors %d", SIXEL_ncol); | |
| 685 | + if (SIXEL_anchor != 0) | ||
| 686 | + strcat(term_options, " animate"); | ||
| 674 | 687 | sprintf(term_options + strlen(term_options), " size %d,%d", | |
| 675 | 688 | term->xmax + 1, term->ymax + 1); | |
| 676 | 689 | } | |
@@ -713,10 +726,9 @@ SIXEL_text() | |||
| 713 | 726 | unsigned * map; | |
| 714 | 727 | int *m; | |
| 715 | 728 | ||
| 716 | - #if (0) | ||
| 717 | 729 | /* place each new plot at upper left of terminal window */ | |
| 730 | + if (SIXEL_anchor) | ||
| 718 | 731 | fprintf(gpoutfile,"\033[H"); | |
| 719 | - #endif | ||
| 720 | 732 | ||
| 721 | 733 | /* initialization to Sixel mode and pixel aspect ratio, | |
| 722 | 734 | but do not change the background */ | |
@@ -1384,7 +1396,7 @@ TERM_TABLE_START(sixel_driver) | |||
| 1384 | 1396 | b_justify_text, line_and_point, do_arrow, set_font_null, | |
| 1385 | 1397 | 0, 0, 0, 0, SIXEL_fillbox, b_linewidth, | |
| 1386 | 1398 | #ifdef USE_MOUSE | |
| 1387 | - NULL, NULL, NULL, NULL, NULL, | ||
| 1399 | + term_waitforinput, NULL, NULL, NULL, NULL, | ||
| 1388 | 1400 | #endif | |
| 1389 | 1401 | SIXEL_make_palette, NULL, SIXEL_set_color, | |
| 1390 | 1402 | SIXEL_filled_polygon, | |
@@ -1474,17 +1486,20 @@ START_HELP(tek40) | |||
| 1474 | 1486 | "?term sixeltek", | |
| 1475 | 1487 | "?sixeltek", | |
| 1476 | 1488 | " Syntax:", | |
| 1477 | - " set terminal sixeltek {<fontsize>} {color|colors <n>|mono} {size <x>,<y>}", | ||
| 1489 | + " set terminal sixeltek {<fontsize>} {mono|color|colors <n>} {size <x>,<y>}", | ||
| 1490 | + " {animate}", | ||
| 1478 | 1491 | "", | |
| 1479 | 1492 | " The `sixel` output format was originally used by DEC terminals and printers.", | |
| 1480 | 1493 | " This driver supports palette images with a maximum of 256 colors. The default", | |
| 1481 | 1494 | " is 16 which can be changed using the `colors` option.", | |
| 1482 | 1495 | "", | |
| 1483 | 1496 | " The font size can be specified as `small`, `medium` or `large`.", | |
| 1484 | 1497 | "", | |
| 1485 | - " For use with xterm emulation, xterm must be compiled/configured with", | ||
| 1498 | + " `animate` causes each new plot to be anchored at the top left of the window", | ||
| 1499 | + " rather than scrolling from the current cursor position.", | ||
| 1500 | + "", | ||
| 1501 | + " For use with xterm, xterm must be compiled/configured with", | ||
| 1486 | 1502 | " \"--enable-sixel-graphics\" and started with \"-ti 340\" on the command line.", | |
| 1487 | - " The menu option \"sixelScrolling\" should be selected.", | ||
| 1488 | 1503 | "", | |
| 1489 | 1504 | " Note that gnuplot also supports another sixel output terminal, `sixelgd`,", | |
| 1490 | 1505 | " that offers more options and features." | |
| Back | FazBrowse Home | New Git URL |
0 commit comments