From ded2e6baa7032020e0b14b1f9fb567174f4668ba Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 1 Dec 2015 15:47:12 -0800 Subject: hdfsee: Round panel transformations before passing them to Cairo This prevents the slight blurring of image data which happened before. --- src/dw-hdfsee.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/dw-hdfsee.c') diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c index 2911e49c..e08782c1 100644 --- a/src/dw-hdfsee.c +++ b/src/dw-hdfsee.c @@ -129,11 +129,11 @@ static void draw_panel_rectangle(cairo_t *cr, cairo_matrix_t *basic_m, cairo_set_matrix(cr, basic_m); /* Move to the right location */ - cairo_translate(cr, p.cnx/dw->binning, - p.cny/dw->binning); + cairo_translate(cr, rint(p.cnx/dw->binning), + rint(p.cny/dw->binning)); /* Twiddle directions according to matrix */ - cairo_matrix_init(&m, p.fsx, p.fsy, p.ssx, p.ssy, + cairo_matrix_init(&m, rint(p.fsx), rint(p.fsy), rint(p.ssx), rint(p.ssy), 0.0, 0.0); cairo_transform(cr, &m); -- cgit v1.2.3