diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-11-08 08:00:18 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-11-09 06:03:02 +0100 |
commit | a135d6f332c31b11b8d4c4b3c3cfb0b500beffb7 (patch) | |
tree | 75d955d15a4435dee69c441f342e32276a49bd8d /fastiv-view.c | |
parent | a0408abdf29127a057cd61ee7106b633ba2aaf12 (diff) | |
download | fiv-a135d6f332c31b11b8d4c4b3c3cfb0b500beffb7.tar.gz fiv-a135d6f332c31b11b8d4c4b3c3cfb0b500beffb7.tar.xz fiv-a135d6f332c31b11b8d4c4b3c3cfb0b500beffb7.zip |
Enable opening images from the browser
Also, make it possible to go back, in a roughly implemented manner.
Diffstat (limited to 'fastiv-view.c')
-rw-r--r-- | fastiv-view.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fastiv-view.c b/fastiv-view.c index 1cf4f17..037008d 100644 --- a/fastiv-view.c +++ b/fastiv-view.c @@ -131,6 +131,11 @@ fastiv_view_draw(GtkWidget *widget, cairo_t *cr) if (h < allocation.height) y = round((allocation.height - h) / 2.); + // XXX: The rounding together with padding may result in up to + // a pixel's worth of made-up picture data. + cairo_rectangle(cr, x, y, w, h); + cairo_clip(cr); + cairo_scale(cr, self->scale, self->scale); cairo_set_source_surface( cr, self->surface, x / self->scale, y / self->scale); |