From 45df774cc9947e195019080608b217f0caf287ef Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Thu, 4 Nov 2021 19:33:29 +0100 Subject: Fix scaling in the view, as in the browser The source pattern needs to be padded. --- fastiv-view.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fastiv-view.c b/fastiv-view.c index 966a1a7..1cf4f17 100644 --- a/fastiv-view.c +++ b/fastiv-view.c @@ -135,8 +135,10 @@ fastiv_view_draw(GtkWidget *widget, cairo_t *cr) cairo_set_source_surface( cr, self->surface, x / self->scale, y / self->scale); + cairo_pattern_t *pattern = cairo_get_source(cr); + cairo_pattern_set_extend(pattern, CAIRO_EXTEND_PAD); // TODO(p): Prescale it ourselves to an off-screen bitmap, gamma-correctly. - cairo_pattern_set_filter(cairo_get_source(cr), CAIRO_FILTER_GOOD); + cairo_pattern_set_filter(pattern, CAIRO_FILTER_GOOD); cairo_paint(cr); return TRUE; -- cgit v1.2.3-70-g09d2