[gthumb] rotation tool: fixed rotation mask when the image is smaller than the original



commit cdc3faae1ce3c66d0da6120b8fa2d3b308185c5b
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Aug 22 00:33:19 2012 +0200

    rotation tool: fixed rotation mask when the image is smaller than the original

 extensions/file_tools/gth-image-rotator.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/extensions/file_tools/gth-image-rotator.c b/extensions/file_tools/gth-image-rotator.c
index 9e1b0eb..e4d7f12 100644
--- a/extensions/file_tools/gth-image-rotator.c
+++ b/extensions/file_tools/gth-image-rotator.c
@@ -309,6 +309,8 @@ paint_darker_background (GthImageRotator *self,
 	cairo_save (cr);
 	cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.5);
 
+	gtk_widget_get_allocation (GTK_WIDGET (self->priv->viewer), &allocation);
+
 	switch (self->priv->resize) {
 	case GTH_TRANSFORM_RESIZE_BOUNDING_BOX:
 	case GTH_TRANSFORM_RESIZE_CLIP:
@@ -321,11 +323,11 @@ paint_darker_background (GthImageRotator *self,
 		crop_region = self->priv->crop_region;
 		crop_region.x += self->priv->clip_area.x / self->priv->preview_zoom;
 		crop_region.y += self->priv->clip_area.y / self->priv->preview_zoom;
+		allocation.width /= self->priv->preview_zoom;
+		allocation.height /= self->priv->preview_zoom;
 		break;
 	}
 
-	gtk_widget_get_allocation (GTK_WIDGET (self->priv->viewer), &allocation);
-
 	/* left side */
 
 	cairo_rectangle (cr,



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