diff options
| author | Přemysl Eric Janouch <p@janouch.name> | 2021-11-04 19:33:29 +0100 | 
|---|---|---|
| committer | Přemysl Eric Janouch <p@janouch.name> | 2021-11-04 19:42:22 +0100 | 
| commit | 45df774cc9947e195019080608b217f0caf287ef (patch) | |
| tree | 022817c718bd71ca5cca618c8f9fbbe40bf24747 | |
| parent | cdb8d852a6e458ff9fe5f9e7f58aaa55f8ddb1cf (diff) | |
| download | fiv-45df774cc9947e195019080608b217f0caf287ef.tar.gz fiv-45df774cc9947e195019080608b217f0caf287ef.tar.xz fiv-45df774cc9947e195019080608b217f0caf287ef.zip  | |
Fix scaling in the view, as in the browser
The source pattern needs to be padded.
| -rw-r--r-- | fastiv-view.c | 4 | 
1 files changed, 3 insertions, 1 deletions
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;  | 
