On Sun, Jul 19, 2009 at 01:00:03PM +0200, Frank van Maarseveen wrote:
> 
> The patch below has been tested and it seems to behave well. Occasionally
> there are rendering artefacts in the preview image (e.g. at crop area
> boundaries). I've seen similar issues in rendering before and the rotate
> control operates at a higher level so I think it's unrelated.

Works well for me too. One change I might suggest is to keep the values
displayed in the rotation control normalized to -180 < a <= 180. The
attached patch applied on top of yours will do this.


Martin
diff --git a/ufraw_preview.c b/ufraw_preview.c
index f093487..04cd73b 100644
--- a/ufraw_preview.c
+++ b/ufraw_preview.c
@@ -2759,6 +2759,15 @@ static void adjustment_update_rotation(GtkAdjustment *adj, gpointer user_data)
 
     (void)user_data;
     data->unnormalized_angle = gtk_adjustment_get_value(adj);
+    /* Normalize the "unnormalized" value displayed to the user to
+     * -180 < a <= 180, though we later normalize to an orientation
+     * and flip plus 0 <= a < 90 rotation for processing.  */ 
+    data->unnormalized_angle -= (360.0 * trunc(data->unnormalized_angle / 360.0));
+    if (data->unnormalized_angle > 180.0)
+	data->unnormalized_angle -= 360.0;
+    else if (data->unnormalized_angle <= -180.0)
+	data->unnormalized_angle += 360.0;
+    gtk_adjustment_set_value(adj, data->unnormalized_angle);
     if (data->FreezeDialog)
 	return;
     CFG->rotationAngle = data->unnormalized_angle;
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
ufraw-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-devel

Reply via email to