[gegl] ops: renamed affine to transform



commit 575388c687bc832e3c1e3127abaf0266498bd06e
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Sun Apr 1 23:49:23 2012 +0100

    ops: renamed affine to transform
    
    It does perspective transforms as well now :)

 configure.ac                                       |    2 +-
 operations/Makefile.am                             |    2 +-
 operations/{affine => transform}/.gitignore        |    0
 operations/{affine => transform}/Makefile.am       |   10 ++--
 operations/{affine => transform}/chant.h           |    8 ++--
 operations/{affine => transform}/module.c          |    2 +-
 operations/{affine => transform}/module.h          |    0
 operations/{affine => transform}/reflect.c         |    2 +-
 operations/{affine => transform}/rotate.c          |    2 +-
 operations/{affine => transform}/scale.c           |    2 +-
 operations/{affine => transform}/shear.c           |    2 +-
 .../affine.c => transform/transform-core.c}        |   48 ++++++++++----------
 .../affine.h => transform/transform-core.h}        |   16 +++---
 operations/{affine => transform}/transform.c       |    2 +-
 operations/{affine => transform}/translate.c       |    2 +-
 15 files changed, 50 insertions(+), 50 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8bba9a8..e1aa873 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1086,12 +1086,12 @@ gegl/opencl/Makefile
 libs/Makefile
 libs/rgbe/Makefile
 operations/Makefile
-operations/affine/Makefile
 operations/core/Makefile
 operations/common/Makefile
 operations/common/perlin/Makefile
 operations/external/Makefile
 operations/generated/Makefile
+operations/transform/Makefile
 operations/workshop/Makefile
 operations/workshop/external/Makefile
 operations/workshop/generated/Makefile
diff --git a/operations/Makefile.am b/operations/Makefile.am
index 8adf6c0..b96e91e 100644
--- a/operations/Makefile.am
+++ b/operations/Makefile.am
@@ -1,8 +1,8 @@
 SUBDIRS = \
-	affine		\
 	core		\
 	common		\
 	generated	\
+	transform \
 	external
 
 if ENABLE_WORKSHOP
diff --git a/operations/affine/.gitignore b/operations/transform/.gitignore
similarity index 100%
rename from operations/affine/.gitignore
rename to operations/transform/.gitignore
diff --git a/operations/affine/Makefile.am b/operations/transform/Makefile.am
similarity index 52%
rename from operations/affine/Makefile.am
rename to operations/transform/Makefile.am
index ba416d0..218f30c 100644
--- a/operations/affine/Makefile.am
+++ b/operations/transform/Makefile.am
@@ -2,13 +2,13 @@ include $(top_srcdir)/operations/Makefile-common.am
 
 LIBS = $(op_libs)
 
-affinelibdir = $(libdir)/gegl-$(GEGL_API_VERSION)
+transformopslibdir = $(libdir)/gegl-$(GEGL_API_VERSION)
 
-affinelib_LTLIBRARIES = affine.la
+transformopslib_LTLIBRARIES = transformops.la
 
-affine_la_SOURCES = \
-	affine.c	\
-	affine.h	\
+transformops_la_SOURCES = \
+	transform-core.c	\
+	transform-core.h	\
 	module.c	\
 	module.h	\
 	reflect.c	\
diff --git a/operations/affine/chant.h b/operations/transform/chant.h
similarity index 98%
rename from operations/affine/chant.h
rename to operations/transform/chant.h
index a549bce..cafef34 100644
--- a/operations/affine/chant.h
+++ b/operations/transform/chant.h
@@ -10,11 +10,11 @@
 #include <glib-object.h>
 #include <gegl-plugin.h>
 
-#include "affine.h"
+#include "transform-core.h"
 #include "module.h"
 
-#define GEGL_CHANT_PARENT_TypeName      OpAffine
-#define GEGL_CHANT_PARENT_TypeNameClass OpAffineClass
+#define GEGL_CHANT_PARENT_TypeName      OpTransform
+#define GEGL_CHANT_PARENT_TypeNameClass OpTransformClass
 #define GEGL_CHANT_PARENT_TYPE          TYPE_OP_AFFINE
 #define GEGL_CHANT_PARENT_CLASS         OP_AFFINE_CLASS
 
@@ -252,7 +252,7 @@ gegl_chant_constructor (GType                  type,
 static void class_init (GeglOperationClass *operation_class);
 #endif
 
-static void create_matrix (OpAffine    *affine,
+static void create_matrix (OpTransform    *affine,
                            GeglMatrix3 *matrix);
 
 static void
diff --git a/operations/affine/module.c b/operations/transform/module.c
similarity index 98%
rename from operations/affine/module.c
rename to operations/transform/module.c
index d01fd66..4ebf301 100644
--- a/operations/affine/module.c
+++ b/operations/transform/module.c
@@ -19,7 +19,7 @@
 #include "config.h"
 #include <gegl-plugin.h>
 #include "module.h"
-#include "affine.h"
+#include "transform-core.h"
 
 static GTypeModule          *affine_module;
 static const GeglModuleInfo  modinfo =
diff --git a/operations/affine/module.h b/operations/transform/module.h
similarity index 100%
rename from operations/affine/module.h
rename to operations/transform/module.h
diff --git a/operations/affine/reflect.c b/operations/transform/reflect.c
similarity index 97%
rename from operations/affine/reflect.c
rename to operations/transform/reflect.c
index f075c14..39a7b18 100644
--- a/operations/affine/reflect.c
+++ b/operations/transform/reflect.c
@@ -39,7 +39,7 @@ gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
 #include <math.h>
 
 static void
-create_matrix (OpAffine    *op,
+create_matrix (OpTransform    *op,
                GeglMatrix3 *matrix)
 {
   GeglChantOperation *chant = GEGL_CHANT_OPERATION (op);
diff --git a/operations/affine/rotate.c b/operations/transform/rotate.c
similarity index 97%
rename from operations/affine/rotate.c
rename to operations/transform/rotate.c
index 6bdee06..8bc8323 100644
--- a/operations/affine/rotate.c
+++ b/operations/transform/rotate.c
@@ -35,7 +35,7 @@ gegl_chant_double (degrees, -G_MAXDOUBLE, G_MAXDOUBLE, 0.,
 #include <math.h>
 
 static void
-create_matrix (OpAffine    *op,
+create_matrix (OpTransform    *op,
                GeglMatrix3 *matrix)
 {
   GeglChantOperation *chant = GEGL_CHANT_OPERATION (op);
diff --git a/operations/affine/scale.c b/operations/transform/scale.c
similarity index 97%
rename from operations/affine/scale.c
rename to operations/transform/scale.c
index 672b944..7c9a960 100644
--- a/operations/affine/scale.c
+++ b/operations/transform/scale.c
@@ -35,7 +35,7 @@ gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1., _("Vertical scale factor"))
 #include <math.h>
 
 static void
-create_matrix (OpAffine    *op,
+create_matrix (OpTransform    *op,
                GeglMatrix3 *matrix)
 {
   GeglChantOperation *chant = GEGL_CHANT_OPERATION (op);
diff --git a/operations/affine/shear.c b/operations/transform/shear.c
similarity index 97%
rename from operations/affine/shear.c
rename to operations/transform/shear.c
index 4277d51..114d774 100644
--- a/operations/affine/shear.c
+++ b/operations/transform/shear.c
@@ -37,7 +37,7 @@ gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1.,
 #include <math.h>
 
 static void
-create_matrix (OpAffine    *op,
+create_matrix (OpTransform    *op,
                GeglMatrix3 *matrix)
 {
   GeglChantOperation *chant = GEGL_CHANT_OPERATION (op);
diff --git a/operations/affine/affine.c b/operations/transform/transform-core.c
similarity index 96%
rename from operations/affine/affine.c
rename to operations/transform/transform-core.c
index 1d41079..145bfd8 100644
--- a/operations/affine/affine.c
+++ b/operations/transform/transform-core.c
@@ -34,7 +34,7 @@
 #include <graph/gegl-node.h>
 #include <graph/gegl-connection.h>
 
-#include "affine.h"
+#include "transform-core.h"
 #include "module.h"
 
 #include "buffer/gegl-buffer-cl-cache.h"
@@ -60,9 +60,9 @@ static void          gegl_affine_set_property              (GObject
 static void          gegl_affine_bounding_box              (gdouble              *points,
                                                             gint                  num_points,
                                                             GeglRectangle        *output);
-static gboolean      gegl_affine_is_intermediate_node      (OpAffine             *affine);
-static gboolean      gegl_affine_is_composite_node         (OpAffine             *affine);
-static void          gegl_affine_get_source_matrix         (OpAffine             *affine,
+static gboolean      gegl_affine_is_intermediate_node      (OpTransform             *affine);
+static gboolean      gegl_affine_is_composite_node         (OpTransform             *affine);
+static void          gegl_affine_get_source_matrix         (OpTransform             *affine,
                                                             GeglMatrix3          *output);
 static GeglRectangle gegl_affine_get_bounding_box          (GeglOperation        *op);
 static GeglRectangle gegl_affine_get_invalidated_by_change (GeglOperation        *operation,
@@ -99,15 +99,15 @@ static void          gegl_affine_fast_reflect_y            (GeglBuffer
 
 /* ************************* */
 
-static void     op_affine_init          (OpAffine      *self);
-static void     op_affine_class_init    (OpAffineClass *klass);
+static void     op_affine_init          (OpTransform      *self);
+static void     op_affine_class_init    (OpTransformClass *klass);
 static gpointer op_affine_parent_class = NULL;
 
 static void
 op_affine_class_intern_init (gpointer klass)
 {
   op_affine_parent_class = g_type_class_peek_parent (klass);
-  op_affine_class_init ((OpAffineClass *) klass);
+  op_affine_class_init ((OpTransformClass *) klass);
 }
 
 GType
@@ -118,13 +118,13 @@ op_affine_get_type (void)
     {
       static const GTypeInfo g_define_type_info =
         {
-          sizeof (OpAffineClass),
+          sizeof (OpTransformClass),
           (GBaseInitFunc) NULL,
           (GBaseFinalizeFunc) NULL,
           (GClassInitFunc) op_affine_class_intern_init,
           (GClassFinalizeFunc) NULL,
           NULL,   /* class_data */
-          sizeof (OpAffine),
+          sizeof (OpTransform),
           0,      /* n_preallocs */
           (GInstanceInitFunc) op_affine_init,
           NULL    /* value_table */
@@ -141,7 +141,7 @@ op_affine_get_type (void)
 
 #if 0
 static void
-op_affine_sampler_init (OpAffine *self)
+op_affine_sampler_init (OpTransform *self)
 {
   GType                 desired_type;
   GeglInterpolation     interpolation;
@@ -172,7 +172,7 @@ gegl_affine_prepare (GeglOperation *operation)
 }
 
 static void
-op_affine_class_init (OpAffineClass *klass)
+op_affine_class_init (OpTransformClass *klass)
 {
   GObjectClass             *gobject_class = G_OBJECT_CLASS (klass);
   /*GeglOperationFilterClass *filter_class  = GEGL_OPERATION_FILTER_CLASS (klass);*/
@@ -241,7 +241,7 @@ gegl_affine_finalize (GObject *object)
 }
 
 static void
-op_affine_init (OpAffine *self)
+op_affine_init (OpTransform *self)
 {
 }
 
@@ -251,7 +251,7 @@ gegl_affine_get_property (GObject    *object,
                           GValue     *value,
                           GParamSpec *pspec)
 {
-  OpAffine *self = OP_AFFINE (object);
+  OpTransform *self = OP_AFFINE (object);
 
   switch (prop_id)
     {
@@ -282,7 +282,7 @@ gegl_affine_set_property (GObject      *object,
                           const GValue *value,
                           GParamSpec   *pspec)
 {
-  OpAffine *self = OP_AFFINE (object);
+  OpTransform *self = OP_AFFINE (object);
 
   switch (prop_id)
     {
@@ -309,7 +309,7 @@ gegl_affine_set_property (GObject      *object,
 }
 
 static void
-gegl_affine_create_matrix (OpAffine    *affine,
+gegl_affine_create_matrix (OpTransform    *affine,
                            GeglMatrix3 *matrix)
 {
   gegl_matrix3_identity (matrix);
@@ -319,7 +319,7 @@ gegl_affine_create_matrix (OpAffine    *affine,
 }
 
 static void
-gegl_affine_create_composite_matrix (OpAffine    *affine,
+gegl_affine_create_composite_matrix (OpTransform    *affine,
                                      GeglMatrix3 *matrix)
 {
   gegl_affine_create_matrix (affine, matrix);
@@ -376,7 +376,7 @@ gegl_affine_bounding_box (gdouble       *points,
 }
 
 static gboolean
-gegl_affine_is_intermediate_node (OpAffine *affine)
+gegl_affine_is_intermediate_node (OpTransform *affine)
 {
   GSList        *connections;
   GeglOperation *op = GEGL_OPERATION (affine);
@@ -402,7 +402,7 @@ gegl_affine_is_intermediate_node (OpAffine *affine)
 }
 
 static gboolean
-gegl_affine_is_composite_node (OpAffine *affine)
+gegl_affine_is_composite_node (OpTransform *affine)
 {
   GSList        *connections;
   GeglOperation *op = GEGL_OPERATION (affine);
@@ -420,7 +420,7 @@ gegl_affine_is_composite_node (OpAffine *affine)
 }
 
 static void
-gegl_affine_get_source_matrix (OpAffine    *affine,
+gegl_affine_get_source_matrix (OpTransform    *affine,
                                GeglMatrix3 *output)
 {
   GSList        *connections;
@@ -441,7 +441,7 @@ gegl_affine_get_source_matrix (OpAffine    *affine,
 static GeglRectangle
 gegl_affine_get_bounding_box (GeglOperation *op)
 {
-  OpAffine      *affine  = OP_AFFINE (op);
+  OpTransform      *affine  = OP_AFFINE (op);
   GeglMatrix3    matrix;
   GeglRectangle  in_rect = {0,0,0,0},
                  have_rect;
@@ -497,7 +497,7 @@ gegl_affine_detect (GeglOperation *operation,
                     gint           x,
                     gint           y)
 {
-  OpAffine    *affine      = OP_AFFINE (operation);
+  OpTransform    *affine      = OP_AFFINE (operation);
   GeglNode    *source_node = gegl_operation_get_source_node (operation, "input");
   GeglMatrix3  inverse;
   gdouble      need_points [2];
@@ -528,7 +528,7 @@ gegl_affine_get_required_for_output (GeglOperation       *op,
                                      const gchar         *input_pad,
                                      const GeglRectangle *region)
 {
-  OpAffine      *affine = OP_AFFINE (op);
+  OpTransform      *affine = OP_AFFINE (op);
   GeglMatrix3    inverse;
   GeglRectangle  requested_rect,
                  need_rect;
@@ -581,7 +581,7 @@ gegl_affine_get_invalidated_by_change (GeglOperation       *op,
                                        const gchar         *input_pad,
                                        const GeglRectangle *input_region)
 {
-  OpAffine          *affine = OP_AFFINE (op);
+  OpTransform          *affine = OP_AFFINE (op);
   GeglMatrix3        matrix;
   GeglRectangle      affected_rect;
   GeglRectangle      context_rect;
@@ -945,7 +945,7 @@ gegl_affine_process (GeglOperation        *operation,
   GeglBuffer          *input;
   GeglBuffer          *output;
   GeglMatrix3          matrix;
-  OpAffine            *affine = (OpAffine *) operation;
+  OpTransform            *affine = (OpTransform *) operation;
 
   gegl_affine_create_composite_matrix (affine, &matrix);
 
diff --git a/operations/affine/affine.h b/operations/transform/transform-core.h
similarity index 74%
rename from operations/affine/affine.h
rename to operations/transform/transform-core.h
index d69eccf..a5200af 100644
--- a/operations/affine/affine.h
+++ b/operations/transform/transform-core.h
@@ -7,15 +7,15 @@
 G_BEGIN_DECLS
 
 #define TYPE_OP_AFFINE               (op_affine_get_type ())
-#define OP_AFFINE(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_OP_AFFINE, OpAffine))
-#define OP_AFFINE_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass),  TYPE_OP_AFFINE, OpAffineClass))
+#define OP_AFFINE(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_OP_AFFINE, OpTransform))
+#define OP_AFFINE_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass),  TYPE_OP_AFFINE, OpTransformClass))
 #define IS_OP_AFFINE(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_OP_AFFINE))
 #define IS_OP_AFFINE_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass),  TYPE_OP_AFFINE))
-#define OP_AFFINE_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj),  TYPE_OP_AFFINE, OpAffineClass))
+#define OP_AFFINE_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj),  TYPE_OP_AFFINE, OpTransformClass))
 
-typedef struct _OpAffine OpAffine;
+typedef struct _OpTransform OpTransform;
 
-struct _OpAffine
+struct _OpTransform
 {
   GeglOperationFilter parent_instance;
   gdouble             origin_x;
@@ -25,13 +25,13 @@ struct _OpAffine
   gint                lanczos_width;
 };
 
-typedef struct _OpAffineClass OpAffineClass;
+typedef struct _OpTransformClass OpTransformClass;
 
-struct _OpAffineClass
+struct _OpTransformClass
 {
   GeglOperationFilterClass parent_class;
 
-  void (* create_matrix) (OpAffine    *affine,
+  void (* create_matrix) (OpTransform    *affine,
                           GeglMatrix3  *matrix);
 };
 
diff --git a/operations/affine/transform.c b/operations/transform/transform.c
similarity index 97%
rename from operations/affine/transform.c
rename to operations/transform/transform.c
index 4e7e9c0..57f33be 100644
--- a/operations/affine/transform.c
+++ b/operations/transform/transform.c
@@ -34,7 +34,7 @@ gegl_chant_string (transform, "", _("Transformation string"))
 #include <math.h>
 
 static void
-create_matrix (OpAffine    *op,
+create_matrix (OpTransform    *op,
                GeglMatrix3 *matrix)
 {
   GeglChantOperation *chant = GEGL_CHANT_OPERATION (op);
diff --git a/operations/affine/translate.c b/operations/transform/translate.c
similarity index 97%
rename from operations/affine/translate.c
rename to operations/transform/translate.c
index 8fa4572..90a571f 100644
--- a/operations/affine/translate.c
+++ b/operations/transform/translate.c
@@ -37,7 +37,7 @@ gegl_chant_double (y, -G_MAXDOUBLE, G_MAXDOUBLE, 1.,
 #include <math.h>
 
 static void
-create_matrix (OpAffine    *op,
+create_matrix (OpTransform    *op,
                GeglMatrix3 *matrix)
 {
   GeglChantOperation *chant = GEGL_CHANT_OPERATION (op);



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