[gthumb: 25/129] rotator: round the image position to the smaller integer



commit ffb3284ede58877f13c1418625db38f1b055ca0b
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri Apr 15 18:16:30 2011 +0200

    rotator: round the image position to the smaller integer

 extensions/file_tools/gth-image-rotator.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/extensions/file_tools/gth-image-rotator.c b/extensions/file_tools/gth-image-rotator.c
index 3e3fab1..dd22833 100644
--- a/extensions/file_tools/gth-image-rotator.c
+++ b/extensions/file_tools/gth-image-rotator.c
@@ -135,8 +135,8 @@ update_image_surface (GthImageRotator *self)
 	self->priv->preview_image = _cairo_image_surface_create_from_pixbuf (tmp_pixbuf);
 	self->priv->preview_image_area.width = width;
 	self->priv->preview_image_area.height = height;
-	self->priv->preview_image_area.x = MAX ((allocation.width - self->priv->preview_image_area.width) / 2, 0);
-	self->priv->preview_image_area.y = MAX ((allocation.height - self->priv->preview_image_area.height) / 2, 0);
+	self->priv->preview_image_area.x = MAX ((allocation.width - self->priv->preview_image_area.width) / 2 - 0.5, 0);
+	self->priv->preview_image_area.y = MAX ((allocation.height - self->priv->preview_image_area.height) / 2 - 0.5, 0);
 
 	_gth_image_rotator_update_tranformation_matrix (self);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]