[Rawstudio-commit] r1659 - trunk/src

Anders Brander anders at brander.dk
Sun Mar 16 22:21:22 CET 2008


Author: abrander
Date: 2008-03-16 22:21:22 +0100 (Sun, 16 Mar 2008)
New Revision: 1659

Modified:
   trunk/src/rawstudio.c
   trunk/src/rawstudio.h
Log:
Added sharpen to RS_SETTIGNS*.

Modified: trunk/src/rawstudio.c
===================================================================
--- trunk/src/rawstudio.c	2008-03-16 16:10:23 UTC (rev 1658)
+++ trunk/src/rawstudio.c	2008-03-16 21:21:22 UTC (rev 1659)
@@ -245,6 +245,7 @@
 	rs_settings_double->contrast = GETVAL(rs_settings->contrast);
 	rs_settings_double->warmth = GETVAL(rs_settings->warmth);
 	rs_settings_double->tint = GETVAL(rs_settings->tint);
+	rs_settings_double->sharpen = GETVAL(rs_settings->sharpen);
 	rs_curve_widget_get_knots(RS_CURVE_WIDGET(rs_settings->curve), &rs_settings_double->curve_knots, &rs_settings_double->curve_nknots);
 	return;
 }
@@ -271,6 +272,8 @@
 		SETVAL(rs_settings->warmth, rs_settings_double->warmth);
 	if (mask & MASK_TINT)
 		SETVAL(rs_settings->tint, rs_settings_double->tint);
+	if (mask & MASK_SHARPEN)
+		SETVAL(rs_settings->sharpen, rs_settings_double->sharpen);
 	if (mask & MASK_CURVE)
 	{
 		rs_curve_widget_reset(RS_CURVE_WIDGET(rs_settings->curve));
@@ -305,6 +308,8 @@
 		gtk_adjustment_set_value((GtkAdjustment *) rss->warmth, 0.0);
 	if (mask & MASK_TINT)
 		gtk_adjustment_set_value((GtkAdjustment *) rss->tint, 0.0);
+	if (mask & MASK_SHARPEN)
+		gtk_adjustment_set_value((GtkAdjustment *) rss->sharpen, 0.0);
 	if (mask & MASK_CURVE)
 	{
 		rs_curve_widget_reset(RS_CURVE_WIDGET(rss->curve));
@@ -325,6 +330,7 @@
 	rss->contrast = gtk_adjustment_new(1.0, 0.0, 3.0, 0.1, 0.5, 0.0);
 	rss->warmth = gtk_adjustment_new(0.0, -2.0, 2.0, 0.1, 0.5, 0.0);
 	rss->tint = gtk_adjustment_new(0.0, -2.0, 2.0, 0.1, 0.5, 0.0);
+	rss->sharpen = gtk_adjustment_new(0.0, 0.0, 10.0, 0.1, 0.5, 0.0);
 	rss->curve = rs_curve_widget_new();
 	return(rss);
 }
@@ -340,6 +346,7 @@
 	rssd->contrast = 1.0;
 	rssd->warmth = 0.0;
 	rssd->tint = 0.0;
+	rssd->sharpen = 0.0;
 	rssd->curve_nknots = 0;
 	rssd->curve_knots = NULL;
 	return rssd;
@@ -362,6 +369,8 @@
 		out->warmth = in->warmth;
 	if (mask & MASK_TINT)
 		out->tint = in->tint;
+	if (mask & MASK_SHARPEN)
+		out->sharpen = in->sharpen;
 	if (mask & MASK_CURVE)
 	{
 

Modified: trunk/src/rawstudio.h
===================================================================
--- trunk/src/rawstudio.h	2008-03-16 16:10:23 UTC (rev 1658)
+++ trunk/src/rawstudio.h	2008-03-16 21:21:22 UTC (rev 1659)
@@ -60,7 +60,8 @@
 	MASK_WARMTH = 16,
 	MASK_TINT = 32,
 	MASK_CURVE = 64,
-	MASK_ALL = 127
+	MASK_SHARPEN = 128,
+	MASK_ALL = 0xffffffff,
 };
 
 #define MASK_WB (MASK_WARMTH|MASK_TINT)
@@ -161,6 +162,7 @@
 	GtkObject *contrast;
 	GtkObject *warmth;
 	GtkObject *tint;
+	GtkObject *sharpen;
 	GtkWidget *curve;
 } RS_SETTINGS;
 
@@ -171,6 +173,7 @@
 	gdouble contrast;
 	gdouble warmth;
 	gdouble tint;
+	gdouble sharpen;
 	guint curve_nknots;
 	gfloat *curve_knots;
 } RS_SETTINGS_DOUBLE;




More information about the Rawstudio-commit mailing list