[gegl] operations: Add sRGB option to svg blends



commit 6cec4e4a60a5e80a08d2d5878c90dad574abbd2c
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Mon Oct 7 01:03:19 2013 -0700

    operations: Add sRGB option to svg blends

 operations/generated/clear.c               |   14 ++++++++++++--
 operations/generated/color-burn.c          |   14 ++++++++++++--
 operations/generated/color-dodge.c         |   14 ++++++++++++--
 operations/generated/darken.c              |   14 ++++++++++++--
 operations/generated/difference.c          |   14 ++++++++++++--
 operations/generated/dst-atop.c            |   14 ++++++++++++--
 operations/generated/dst-in.c              |   14 ++++++++++++--
 operations/generated/dst-out.c             |   14 ++++++++++++--
 operations/generated/dst-over.c            |   14 ++++++++++++--
 operations/generated/dst.c                 |   14 ++++++++++++--
 operations/generated/exclusion.c           |   14 ++++++++++++--
 operations/generated/hard-light.c          |   14 ++++++++++++--
 operations/generated/lighten.c             |   14 ++++++++++++--
 operations/generated/overlay.c             |   14 ++++++++++++--
 operations/generated/plus.c                |   14 ++++++++++++--
 operations/generated/screen.c              |   14 ++++++++++++--
 operations/generated/soft-light.c          |   14 ++++++++++++--
 operations/generated/src-atop.c            |   14 ++++++++++++--
 operations/generated/src-in.c              |   14 ++++++++++++--
 operations/generated/src-out.c             |   14 ++++++++++++--
 operations/generated/src.c                 |   14 ++++++++++++--
 operations/generated/svg-12-blend.rb       |   14 ++++++++++++--
 operations/generated/svg-12-porter-duff.rb |   14 ++++++++++++--
 operations/generated/svg-multiply.c        |   14 ++++++++++++--
 operations/generated/xor.c                 |   14 ++++++++++++--
 25 files changed, 300 insertions(+), 50 deletions(-)
---
diff --git a/operations/generated/clear.c b/operations/generated/clear.c
index e0daae3..e01dca4 100644
--- a/operations/generated/clear.c
+++ b/operations/generated/clear.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/color-burn.c b/operations/generated/color-burn.c
index 8d068d2..c017220 100644
--- a/operations/generated/color-burn.c
+++ b/operations/generated/color-burn.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/color-dodge.c b/operations/generated/color-dodge.c
index 5c4657f..b29d0c5 100644
--- a/operations/generated/color-dodge.c
+++ b/operations/generated/color-dodge.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/darken.c b/operations/generated/darken.c
index 2ce675d..dd2a791 100644
--- a/operations/generated/darken.c
+++ b/operations/generated/darken.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/difference.c b/operations/generated/difference.c
index 32e2416..78f27b0 100644
--- a/operations/generated/difference.c
+++ b/operations/generated/difference.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/dst-atop.c b/operations/generated/dst-atop.c
index 99fd762..31a66cf 100644
--- a/operations/generated/dst-atop.c
+++ b/operations/generated/dst-atop.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/dst-in.c b/operations/generated/dst-in.c
index 98135bc..8f9b1aa 100644
--- a/operations/generated/dst-in.c
+++ b/operations/generated/dst-in.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/dst-out.c b/operations/generated/dst-out.c
index 94e9c22..9b3195b 100644
--- a/operations/generated/dst-out.c
+++ b/operations/generated/dst-out.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/dst-over.c b/operations/generated/dst-over.c
index 37399a1..8b76418 100644
--- a/operations/generated/dst-over.c
+++ b/operations/generated/dst-over.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/dst.c b/operations/generated/dst.c
index 8ec7d5d..c05b864 100644
--- a/operations/generated/dst.c
+++ b/operations/generated/dst.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/exclusion.c b/operations/generated/exclusion.c
index 22ca3f9..1cab7bb 100644
--- a/operations/generated/exclusion.c
+++ b/operations/generated/exclusion.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/hard-light.c b/operations/generated/hard-light.c
index df94b19..22b0a7a 100644
--- a/operations/generated/hard-light.c
+++ b/operations/generated/hard-light.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/lighten.c b/operations/generated/lighten.c
index 7b53d7c..8b5d218 100644
--- a/operations/generated/lighten.c
+++ b/operations/generated/lighten.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/overlay.c b/operations/generated/overlay.c
index 9c1d3a4..45cd4cd 100644
--- a/operations/generated/overlay.c
+++ b/operations/generated/overlay.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/plus.c b/operations/generated/plus.c
index 3d3e98e..592dff2 100644
--- a/operations/generated/plus.c
+++ b/operations/generated/plus.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/screen.c b/operations/generated/screen.c
index 4d3833e..6c4b2f8 100644
--- a/operations/generated/screen.c
+++ b/operations/generated/screen.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/soft-light.c b/operations/generated/soft-light.c
index a8442c1..223acc8 100644
--- a/operations/generated/soft-light.c
+++ b/operations/generated/soft-light.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -46,7 +49,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/src-atop.c b/operations/generated/src-atop.c
index 87b9f55..84d2c19 100644
--- a/operations/generated/src-atop.c
+++ b/operations/generated/src-atop.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/src-in.c b/operations/generated/src-in.c
index f082820..23611cb 100644
--- a/operations/generated/src-in.c
+++ b/operations/generated/src-in.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/src-out.c b/operations/generated/src-out.c
index c188d17..5ecac6c 100644
--- a/operations/generated/src-out.c
+++ b/operations/generated/src-out.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/src.c b/operations/generated/src.c
index c23946b..5feef9e 100644
--- a/operations/generated/src.c
+++ b/operations/generated/src.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/svg-12-blend.rb b/operations/generated/svg-12-blend.rb
index 0454dbd..6ea6564 100755
--- a/operations/generated/svg-12-blend.rb
+++ b/operations/generated/svg-12-blend.rb
@@ -21,6 +21,7 @@ copyright = '
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -77,7 +78,9 @@ file_head1 = '
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 '
@@ -85,7 +88,14 @@ file_head1 = '
 file_head2 = '
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R\'aG\'aB\'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/svg-12-porter-duff.rb b/operations/generated/svg-12-porter-duff.rb
index 22de28b..8b67241 100755
--- a/operations/generated/svg-12-porter-duff.rb
+++ b/operations/generated/svg-12-porter-duff.rb
@@ -21,6 +21,7 @@ copyright = '
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -79,7 +80,9 @@ file_head1 = '
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 '
@@ -87,7 +90,14 @@ file_head1 = '
 file_head2 = '
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R\'aG\'aB\'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/svg-multiply.c b/operations/generated/svg-multiply.c
index 6f10d76..233b9ef 100644
--- a/operations/generated/svg-multiply.c
+++ b/operations/generated/svg-multiply.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);
diff --git a/operations/generated/xor.c b/operations/generated/xor.c
index c079de5..9525726 100644
--- a/operations/generated/xor.c
+++ b/operations/generated/xor.c
@@ -18,6 +18,7 @@
  *
  *  Copyright 2006, 2007 Øyvind Kolås <pippin gimp org>
  *            2007 John Marshall
+ *            2013 Daniel Sabo
  *
  * SVG rendering modes; see:
  *     http://www.w3.org/TR/SVG12/rendering.html
@@ -34,7 +35,9 @@
 
 #ifdef GEGL_CHANT_PROPERTIES
 
-/* no properties */
+gegl_chant_boolean (srgb, _("sRGB"),
+                    FALSE,
+                    _("Use sRGB gamma instead of linear"))
 
 #else
 
@@ -45,7 +48,14 @@
 
 static void prepare (GeglOperation *operation)
 {
-  const Babl *format = babl_format ("RaGaBaA float");
+  GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+
+  const Babl *format;
+
+  if (o->srgb)
+    format = babl_format ("R'aG'aB'aA float");
+  else
+    format = babl_format ("RaGaBaA float");
 
   gegl_operation_set_format (operation, "input", format);
   gegl_operation_set_format (operation, "aux", format);


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