aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-12-01 15:47:12 -0800
committerThomas White <taw@physics.org>2015-12-01 15:47:12 -0800
commitded2e6baa7032020e0b14b1f9fb567174f4668ba (patch)
treed05e180484a0bc52ed0d764ff8d5c6c36eccba2d /src
parent8ef775ab75941b193b4c1cadf347d63b8270d6ee (diff)
hdfsee: Round panel transformations before passing them to Cairo
This prevents the slight blurring of image data which happened before.
Diffstat (limited to 'src')
-rw-r--r--src/dw-hdfsee.c6
1 files changed, 3 insertions, 3 deletions
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);