aboutsummaryrefslogtreecommitdiffstats
path: root/image.c
diff options
context:
space:
mode:
authorBerke Kocaoğlu <berkekocaoglu360@gmail.com>2021-04-14 19:10:14 +0200
committerBerke Kocaoğlu <berke.kocaoglu@metu.edu.tr>2021-09-16 21:55:31 +0200
commit88f77bc59c26068ae1a5e1c9a8bd3b1b88dbe683 (patch)
treed66afc56af1d2829916555fa0308f3acf90eb4c2 /image.c
parent1d28627868f5133a25a0197af21a187799ffa98e (diff)
downloadnsxiv-88f77bc59c26068ae1a5e1c9a8bd3b1b88dbe683.tar.zst
Implement fill scale mode
Diffstat (limited to 'image.c')
-rw-r--r--image.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/image.c b/image.c
index 9a9c531..fa10ab9 100644
--- a/image.c
+++ b/image.c
@@ -402,6 +402,9 @@ bool img_fit(img_t *img)
zh = (float) img->win->h / (float) img->h;
switch (img->scalemode) {
+ case SCALE_FILL:
+ z = MAX(zw, zh);
+ break;
case SCALE_WIDTH:
z = zw;
break;