gegl r1936 - in trunk: . gegl/operation



Author: mitch
Date: Tue Jan 29 09:55:03 2008
New Revision: 1936
URL: http://svn.gnome.org/viewvc/gegl?rev=1936&view=rev

Log:
2008-01-29  Michael Natterer  <mitch gimp org>

	* gegl/operation/gegl-operation-area-filter.c
	* gegl/operation/gegl-operation-composer.c: #include stuff only
	at the beginning of the file, reorder some declarations and
	function definitions, indentation, spacing, blah.



Modified:
   trunk/ChangeLog
   trunk/gegl/operation/gegl-operation-area-filter.c
   trunk/gegl/operation/gegl-operation-composer.c

Modified: trunk/gegl/operation/gegl-operation-area-filter.c
==============================================================================
--- trunk/gegl/operation/gegl-operation-area-filter.c	(original)
+++ trunk/gegl/operation/gegl-operation-area-filter.c	Tue Jan 29 09:55:03 2008
@@ -15,6 +15,7 @@
  *
  * Copyright 2007 Ãyvind KolÃs
  */
+
 #define GEGL_INTERNAL
 
 #include "config.h"
@@ -23,6 +24,7 @@
 #include <string.h>
 #include "gegl-types.h"
 #include "gegl-operation-area-filter.h"
+#include <math.h>
 #include "gegl-utils.h"
 #include "graph/gegl-node.h"
 #include "graph/gegl-connection.h"
@@ -30,16 +32,8 @@
 #include "buffer/gegl-region.h"
 #include "buffer/gegl-buffer.h"
 
-#include <string.h>
-
-G_DEFINE_TYPE (GeglOperationAreaFilter, gegl_operation_area_filter, GEGL_TYPE_OPERATION_FILTER)
-
-static void prepare (GeglOperation *operation)
-{
-  gegl_operation_set_format (operation, "input", babl_format ("RGBA float"));
-  gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
-}
 
+static void          prepare                 (GeglOperation       *operation);
 static GeglRectangle get_defined_region      (GeglOperation       *operation);
 static GeglRectangle compute_input_request   (GeglOperation       *operation,
                                               const gchar         *input_pad,
@@ -48,6 +42,9 @@
                                               const gchar         *input_pad,
                                               const GeglRectangle *input_region);
 
+G_DEFINE_TYPE (GeglOperationAreaFilter, gegl_operation_area_filter,
+               GEGL_TYPE_OPERATION_FILTER)
+
 static void
 gegl_operation_area_filter_class_init (GeglOperationAreaFilterClass *klass)
 {
@@ -68,14 +65,21 @@
   self->top=0;
 }
 
-#include <math.h>
+static void prepare (GeglOperation *operation)
+{
+  gegl_operation_set_format (operation, "input", babl_format ("RGBA float"));
+  gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
+}
+
 static GeglRectangle
 get_defined_region (GeglOperation *operation)
 {
-  GeglRectangle  result = {0,0,0,0};
-  GeglRectangle *in_rect = gegl_operation_source_get_defined_region (operation,
-                                                                     "input");
   GeglOperationAreaFilter *area = GEGL_OPERATION_AREA_FILTER (operation);
+  GeglRectangle            result = { 0, };
+  GeglRectangle           *in_rect;
+
+  in_rect = gegl_operation_source_get_defined_region (operation,
+                                                      "input");
 
   if (!in_rect)
     return result;
@@ -93,16 +97,15 @@
   return result;
 }
 
-#include "gegl-utils.h"
-
 static GeglRectangle
 compute_input_request (GeglOperation       *operation,
                        const gchar         *input_pad,
                        const GeglRectangle *region)
 {
   GeglOperationAreaFilter *area = GEGL_OPERATION_AREA_FILTER (operation);
-  GeglRectangle       rect;
-  GeglRectangle       defined;
+  GeglRectangle            rect;
+  GeglRectangle            defined;
+
   defined = get_defined_region (operation);
   gegl_rectangle_intersect (&rect, region, &defined);
 

Modified: trunk/gegl/operation/gegl-operation-composer.c
==============================================================================
--- trunk/gegl/operation/gegl-operation-composer.c	(original)
+++ trunk/gegl/operation/gegl-operation-composer.c	Tue Jan 29 09:55:03 2008
@@ -62,13 +62,14 @@
                                             const GeglRectangle *roi);
 
 
-G_DEFINE_TYPE (GeglOperationComposer, gegl_operation_composer, GEGL_TYPE_OPERATION)
+G_DEFINE_TYPE (GeglOperationComposer, gegl_operation_composer,
+               GEGL_TYPE_OPERATION)
 
 
 static void
 gegl_operation_composer_class_init (GeglOperationComposerClass * klass)
 {
-  GObjectClass    *object_class = G_OBJECT_CLASS (klass);
+  GObjectClass       *object_class    = G_OBJECT_CLASS (klass);
   GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
 
   object_class->set_property = set_property;



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