summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Bosveld <Joel.Bosveld@gmail.com>2008-06-03 07:09:54 +0800
committerJoel Bosveld <Joel.Bosveld@gmail.com>2008-06-03 07:09:54 +0800
commit01837c06114865af3a1ffc852307ccb4331b6df3 (patch)
treeb04bbae304df64150cf7bccc9515a3854d3a9672
parentea4cee831321e034b47b47009cfbfbe82a856f2b (diff)
downloadjasper-01837c06114865af3a1ffc852307ccb4331b6df3.tar.gz
jasper-01837c06114865af3a1ffc852307ccb4331b6df3.tar.bz2
Fix rounding error in cairoAnimation plugin
-rw-r--r--plugins/cairoAnimation.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/cairoAnimation.c b/plugins/cairoAnimation.c
index acfc6cb..4af00e6 100644
--- a/plugins/cairoAnimation.c
+++ b/plugins/cairoAnimation.c
@@ -105,7 +105,6 @@ paintButton (JasperWindow *w, JasperButton *b)
cairo_set_source_rgba (cb->cr, cb->colour[0], cb->colour[1], cb->colour[2], cb->colour[3]);
cairo_paint (cb->cr);
- cairo_rectangle (cw->cr, cb->x, cb->y, cb->w, cb->h);
cairo_set_source_surface (cw->cr, cb->source, cb->x, cb->y);
cairo_mask_surface (cw->cr, cb->mask, cb->x, cb->y);
@@ -189,8 +188,8 @@ handleButtons (JasperWindow *w, JasperButton *b)
cb->x = bb->quad.m.x0;
cb->y = bb->quad.m.y0;
- cb->w = sx*(x2-x1);
- cb->h = sy*(y2-y1);
+ cb->w = sx*(x2-x1)+0.5;
+ cb->h = sy*(y2-y1)+0.5;
if(cb->mask) cairo_surface_destroy (cb->mask);
if(cb->source) cairo_surface_destroy (cb->source);