aboutsummaryrefslogtreecommitdiffstats
path: root/image.c
diff options
context:
space:
mode:
authorAraki Ken <arakiken@users.sf.net>2014-10-20 13:36:37 +0000
committerTatsuya Kinoshita <tats@debian.org>2014-12-06 11:47:05 +0000
commit982a8feab0928185053d83592ebe7fff28829b90 (patch)
tree993525fc1330f4343bc47548829589e7177302c4 /image.c
parentIf SCREEN_VARIANT=sixel on GNU screen, exec img2sixel without -P option. (diff)
downloadw3m-982a8feab0928185053d83592ebe7fff28829b90.tar.gz
w3m-982a8feab0928185053d83592ebe7fff28829b90.zip
* Add n_terminal_image argument to put_image_{sixel|osc5379}(). * Use struct winsize to calculate ppc and ppl.
Diffstat (limited to 'image.c')
-rw-r--r--image.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/image.c b/image.c
index f4fb487..91034ee 100644
--- a/image.c
+++ b/image.c
@@ -195,8 +195,8 @@ syncImage(void)
n_terminal_image = 0;
}
-void put_image_osc5379(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int sh);
-void put_image_sixel(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int sh);
+void put_image_osc5379(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int sh, int n_terminal_image);
+void put_image_sixel(char *url, int x, int y, int w, int h, int sx, int sy, int sw, int sh, int n_terminal_image);
void
drawImage()
@@ -247,7 +247,8 @@ drawImage()
i->sx / pixel_per_char_i,
i->sy / pixel_per_line_i,
(i->width + i->sx % pixel_per_char_i + pixel_per_char_i - 1) / pixel_per_char_i,
- (i->height + i->sy % pixel_per_line_i + pixel_per_line_i - 1) / pixel_per_line_i);
+ (i->height + i->sy % pixel_per_line_i + pixel_per_line_i - 1) / pixel_per_line_i,
+ n_terminal_image);
continue ;
}