gegl r1911 - in trunk: . operations/generated



Author: kcozens
Date: Thu Jan 24 22:54:05 2008
New Revision: 1911
URL: http://svn.gnome.org/viewvc/gegl?rev=1911&view=rev

Log:
	* operations/generated/math.rb:
	* operations/generated/svg-12-blend.rb: De-tabified.

	* operations/generated/other-blend.rb:
	* operations/generated/svg-12-porter-duff.rb: Fixed error in
	generation of operation_class_init(). De-tabified.


Modified:
   trunk/ChangeLog
   trunk/operations/generated/math.rb
   trunk/operations/generated/other-blend.rb
   trunk/operations/generated/svg-12-blend.rb
   trunk/operations/generated/svg-12-porter-duff.rb

Modified: trunk/operations/generated/math.rb
==============================================================================
--- trunk/operations/generated/math.rb	(original)
+++ trunk/operations/generated/math.rb	Thu Jan 24 22:54:05 2008
@@ -85,45 +85,45 @@
   gfloat *in = in_buf;
   gfloat *out = out_buf;
   gfloat *aux = aux_buf;
-gint    i;
+  gint    i;
 
   if (aux == NULL)
     {
       gfloat value = GEGL_CHANT_PROPERTIES (op)->value;
       for (i=0; i<n_pixels; i++)
-	{
-	  gint   j;
-	  gfloat c;
-	  for (j=0; j<3; j++)
-	    {
-	      c=in[j];
-	      #{formula};
-	      out[j]=c;
-	    }
-	  out[3]=in[3];
-	  in += 4;
-	  out+= 4;
-	}
+        {
+          gint   j;
+          gfloat c;
+          for (j=0; j<3; j++)
+            {
+              c=in[j];
+              #{formula};
+              out[j]=c;
+            }
+          out[3]=in[3];
+          in += 4;
+          out+= 4;
+        }
     }
   else
     {
       for (i=0; i<n_pixels; i++)
-	{
-	  gint   j;
-	  gfloat c;
-	  gfloat value;
-	  for (j=0; j<3; j++)
-	    {
-	      c=in[j];
-	      value=aux[j];
-	      #{formula};
-	      out[j]=c;
-	    }
-	  out[3]=in[3];
-	  in += 4;
-	  aux += 3;
-	  out+= 4;
-	}
+        {
+          gint   j;
+          gfloat c;
+          gfloat value;
+          for (j=0; j<3; j++)
+            {
+              c=in[j];
+              value=aux[j];
+              #{formula};
+              out[j]=c;
+            }
+          out[3]=in[3];
+          in += 4;
+          aux += 3;
+          out+= 4;
+        }
     }
   
   return TRUE;

Modified: trunk/operations/generated/other-blend.rb
==============================================================================
--- trunk/operations/generated/other-blend.rb	(original)
+++ trunk/operations/generated/other-blend.rb	Thu Jan 24 22:54:05 2008
@@ -74,7 +74,7 @@
     return TRUE;
 '
 
-file_tail = '
+file_tail1 = '
   return TRUE;
 }
 
@@ -90,11 +90,9 @@
 
   point_composer_class->process = process;
   operation_class->prepare = prepare;
+'
 
-  operation_class->name        = "#{name}";
-  operation_class->categories  = "compositors:other_blend";
-  operation_class->description =
-        "Other blend operation #{name} (d = #{c_formula})";
+file_tail2 = '  operation_class->categories  = "compositors:other-blend";
 
   operation_class->no_cache = TRUE;   /* the over op has special fast paths
                                          that makes caching be buggy in
@@ -158,7 +156,13 @@
     }
 
 "
-  file.write file_tail
+  file.write file_tail1
+  file.write "
+  operation_class->name        = \"#{name}\";
+  operation_class->description =
+        \"Other blend operation #{name} (d = #{c_formula})\";
+"
+  file.write file_tail2
   file.close
 end
 

Modified: trunk/operations/generated/svg-12-blend.rb
==============================================================================
--- trunk/operations/generated/svg-12-blend.rb	(original)
+++ trunk/operations/generated/svg-12-blend.rb	Thu Jan 24 22:54:05 2008
@@ -179,7 +179,7 @@
   file.write "
   operation_class->name        = \"#{name}\";
   operation_class->description =
-	\"SVG blend operation #{name} (<tt>d = #{formula1}</tt>)\";
+        \"SVG blend operation #{name} (<tt>d = #{formula1}</tt>)\";
 "
   file.write file_tail2
   file.close
@@ -243,7 +243,7 @@
   file.write "
   operation_class->name        = \"#{name}\";
   operation_class->description =
-	\"SVG blend operation #{name} (<tt>if #{cond1}: d = #{formula1} otherwise: d = #{formula2}</tt>)\";
+        \"SVG blend operation #{name} (<tt>if #{cond1}: d = #{formula1} otherwise: d = #{formula2}</tt>)\";
 "
   file.write file_tail2
   file.close
@@ -312,7 +312,7 @@
   file.write "
   operation_class->name        = \"#{name}\";
   operation_class->description =
-	\"SVG blend operation #{name} (<tt>if #{cond1}: d = #{formula1}; if #{cond2}: d = #{formula2}; otherwise: d = #{formula3}</tt>)\";
+        \"SVG blend operation #{name} (<tt>if #{cond1}: d = #{formula1}; if #{cond2}: d = #{formula2}; otherwise: d = #{formula3}</tt>)\";
 "
   file.write file_tail2
   file.close
@@ -355,13 +355,13 @@
       aD = #{formula2};
 
       for (j = 0; j < 3; j++)
-	{
-	  gfloat cA, cB;
+        {
+          gfloat cA, cB;
 
-	  cB = in[j];
-	  cA = aux[j];
-	  out[j] = CLAMP (#{formula1}, 0, aD);
-	}
+          cB = in[j];
+          cA = aux[j];
+          out[j] = CLAMP (#{formula1}, 0, aD);
+        }
       out[3] = aD;
       in  += 4;
       aux += 4;
@@ -372,7 +372,7 @@
   file.write "
   operation_class->name        = \"#{name}\";
   operation_class->description =
-	\"SVG blend operation #{name} (<tt>d = #{formula1}</tt>)\";
+        \"SVG blend operation #{name} (<tt>d = #{formula1}</tt>)\";
 "
   file.write file_tail2
   file.close

Modified: trunk/operations/generated/svg-12-porter-duff.rb
==============================================================================
--- trunk/operations/generated/svg-12-porter-duff.rb	(original)
+++ trunk/operations/generated/svg-12-porter-duff.rb	Thu Jan 24 22:54:05 2008
@@ -92,7 +92,7 @@
     return TRUE;
 '
 
-file_tail = '
+file_tail1 = '
   return TRUE;
 }
 
@@ -107,11 +107,9 @@
 
   point_composer_class->process = process;
   operation_class->prepare = prepare;
+'
 
-  operation_class->name        = "#{name}";
-  operation_class->categories  = "compositors:porter duff";
-  operation_class->description =
-        "Porter Duff operation #{name} (d = #{c_formula})";
+file_tail2 = '  operation_class->categories  = "compositors:porter-duff";
 }
 
 #endif
@@ -167,7 +165,13 @@
       out += 4;
     }
 "
-  file.write file_tail
+  file.write file_tail1
+  file.write "
+  operation_class->name        = \"#{name}\";
+  operation_class->description =
+        \"Porter Duff operation #{name} (d = #{c_formula})\";
+"
+  file.write file_tail2
   file.close
 end
 



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