Author: post
Date: 2010-12-30 02:55:05 +0100 (Thu, 30 Dec 2010)
New Revision: 3738
Modified:
trunk/src/rs-preview-widget.c
Log:
Add "Original Aspect" as option for cropping.
Modified: trunk/src/rs-preview-widget.c
===================================================================
--- trunk/src/rs-preview-widget.c 2010-12-30 01:33:23 UTC (rev 3737)
+++ trunk/src/rs-preview-widget.c 2010-12-30 01:55:05 UTC (rev 3738)
@@ -1092,6 +1092,12 @@
const static gdouble aspect_169 = 16.0f/9.0f;
const static gdouble aspect_83 = 8.0f/3.0f;
const static gdouble aspect_11 = 1.0f;
+ static gdouble aspect_org ;
+ aspect_org = (gdouble)preview->photo->input->w /
preview->photo->input->h;
+
+ if (aspect_org < 1.0 && aspect_org != 0.0)
+ aspect_org = 1.0 / aspect_org;
+
static gdouble aspect_iso216;
static gdouble aspect_golden;
aspect_iso216 = sqrt(2.0f);
@@ -1139,6 +1145,7 @@
aspect_confbox = gui_confbox_new(CONF_CROP_ASPECT);
gui_confbox_set_callback(aspect_confbox, preview, crop_aspect_changed);
gui_confbox_add_entry(aspect_confbox, "freeform", _("Freeform"),
(gpointer) &aspect_freeform);
+ gui_confbox_add_entry(aspect_confbox, "original", _("Original Aspect"),
(gpointer) &aspect_org);
gui_confbox_add_entry(aspect_confbox, "iso216", _("ISO paper (A4)"),
(gpointer) &aspect_iso216);
gui_confbox_add_entry(aspect_confbox, "3:2", _("3:2 (35mm)"),
(gpointer) &aspect_32);
gui_confbox_add_entry(aspect_confbox, "4:3", _("4:3"), (gpointer)
&aspect_43);
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit