[gegl] Fix unprefixed public type. Point -> GeglPathPoint



commit 5787111d2fdda973e1674f5e0dc948e432f950c4
Author: Jon Nordby <jononor gmail com>
Date:   Sat Oct 1 00:57:14 2011 +0200

    Fix unprefixed public type. Point -> GeglPathPoint

 gegl/property-types/gegl-path.c |   30 +++++++++++++++---------------
 gegl/property-types/gegl-path.h |   36 ++++++++++++++++++------------------
 operations/external/path.c      |    4 ++--
 operations/workshop/warp.c      |    2 +-
 4 files changed, 36 insertions(+), 36 deletions(-)
---
diff --git a/gegl/property-types/gegl-path.c b/gegl/property-types/gegl-path.c
index f483ad5..7bd0e11 100644
--- a/gegl/property-types/gegl-path.c
+++ b/gegl/property-types/gegl-path.c
@@ -141,7 +141,7 @@ static void             copy_data                     (const GeglPathItem *src,
                                                        GeglPathItem     *dst);
 static void             bezier2                       (GeglPathItem     *prev,
                                                        GeglPathItem     *curve,
-                                                       Point            *dest,
+                                                       GeglPathPoint    *dest,
                                                        gfloat            t);
 static void             gegl_path_item_free           (GeglPathList     *p);
 static GeglPathList *   gegl_path_list_append_item    (GeglPathList     *head,
@@ -1180,7 +1180,7 @@ flatten_curve (GeglMatrix3  *matrix,
                GeglPathList *self)
 {
   gfloat f;
-  Point res;
+  GeglPathPoint res;
   gchar buf[64]="C";
   GeglPathItem *item=(void*)buf;
 
@@ -1252,10 +1252,10 @@ copy_data (const GeglPathItem *src,
 static void
 bezier2 (GeglPathItem  *prev,
          GeglPathItem  *curve,
-         Point *dest,
+         GeglPathPoint *dest,
          gfloat t)
 {
-  Point ab,bc,cd,abbc,bccd;
+  GeglPathPoint ab,bc,cd,abbc,bccd;
 
   if (prev->type == 'c')
     gegl_path_point_lerp (&ab, &prev->point[2], &curve->point[0], t);
@@ -1434,7 +1434,7 @@ gegl_path_list_calc (GeglPathList *path,
 
           case 'L':
             {
-              Point a,b;
+              GeglPathPoint a,b;
               gfloat distance;
 
               a.x = prev->d.point[0].x;
@@ -1448,7 +1448,7 @@ gegl_path_list_calc (GeglPathList *path,
 
               if (pos <= next_pos)
                 {
-                  Point spot;
+                  GeglPathPoint spot;
                   gfloat ratio = (pos - traveled) / (next_pos - traveled);
 
                   gegl_path_point_lerp (&spot, &a, &b, ratio);
@@ -1504,7 +1504,7 @@ gegl_path_list_calc_values (GeglPathList *path,
             break;
           case 'L':
             {
-              Point a,b;
+              GeglPathPoint a,b;
               gfloat distance;
 
               a.x = x;
@@ -1518,7 +1518,7 @@ gegl_path_list_calc_values (GeglPathList *path,
 
               while (next_sample <= next_pos)
                 {
-                  Point spot;
+                  GeglPathPoint spot;
                   gfloat ratio = (next_sample - traveled) / (next_pos - traveled);
 
                   gegl_path_point_lerp (&spot, &a, &b, ratio);
@@ -1572,7 +1572,7 @@ gegl_path_list_get_length (GeglPathList *path)
             break;
           case 'L':
             {
-              Point a,b;
+              GeglPathPoint a,b;
               gfloat distance;
 
               a.x = x;
@@ -1602,11 +1602,11 @@ gegl_path_list_get_length (GeglPathList *path)
   return traveled_length;
 }
 
-/***** Point *****/
+/***** GeglPathPoint *****/
 void
-gegl_path_point_lerp (Point  *dest,
-                      Point  *a,
-                      Point  *b,
+gegl_path_point_lerp (GeglPathPoint  *dest,
+                      GeglPathPoint  *a,
+                      GeglPathPoint  *b,
                       gfloat  t)
 {
   dest->x = a->x + (b->x-a->x) * t;
@@ -1614,8 +1614,8 @@ gegl_path_point_lerp (Point  *dest,
 }
 
 gdouble
-gegl_path_point_dist (Point *a,
-                      Point *b)
+gegl_path_point_dist (GeglPathPoint *a,
+                      GeglPathPoint *b)
 {
   return sqrt ((a->x-b->x)*(a->x-b->x) +
                (a->y-b->y)*(a->y-b->y));
diff --git a/gegl/property-types/gegl-path.h b/gegl/property-types/gegl-path.h
index 24a5cd8..df24ea6 100644
--- a/gegl/property-types/gegl-path.h
+++ b/gegl/property-types/gegl-path.h
@@ -64,30 +64,30 @@ GType                gegl_path_get_type       (void) G_GNUC_CONST;
  * 4 points internally only the needed amount of memory is stored
  * for a GeglPathItem.
  *
- *  </p><pre>typedef struct Point
+ *  </p><pre>typedef struct GeglPathPoint
  * {
  *   gfloat x;
  *   gfloat y;
- * } Point;</pre></p>
+ * } GeglPathPoint;</pre></p>
  * </p><pre>typedef struct GeglPathItem
  * {
  *   gchar  type;
- *   Point  point[4];
+ *   GeglPathPoint  point[4];
  * } GeglPathItem;</pre></p>
  *
  */
 
 
-typedef struct Point
+typedef struct GeglPathPoint
 {
   gfloat x;
   gfloat y;
-} Point;
+} GeglPathPoint;
 
 typedef struct GeglPathItem
 {
   gchar  type;     /* should perhaps be padded out? */
-  Point  point[4]; /* Note: internally GeglPath operates with paths that
+  GeglPathPoint  point[4]; /* Note: internally GeglPath operates with paths that
                     * have the exact number of pairs allocated.
                     */
 } GeglPathItem;
@@ -471,32 +471,32 @@ GeglPathList *        gegl_path_get_path (GeglPath *path);
 GeglPathList *        gegl_path_get_flat_path (GeglPath *path);
 
 /***
- * Point: (skip)
+ * GeglPathPoint: (skip)
  */
 
 /**
  * gegl_path_point_lerp: (skip)
  * @dest: return location for the result
- * @a: origin Point
- * @b: destination Point
+ * @a: origin GeglPathPoint
+ * @b: destination GeglPathPoint
  * @t: ratio between @a and @b
  *
- * linear interpolation between two #Point
+ * linear interpolation between two #GeglPathPoint
  */
-void                  gegl_path_point_lerp    (Point            *dest,
-                                               Point            *a,
-                                               Point            *b,
+void                  gegl_path_point_lerp    (GeglPathPoint    *dest,
+                                               GeglPathPoint    *a,
+                                               GeglPathPoint    *b,
                                                gfloat            t);
 
 /**
  * gegl_path_point_dist: (skip)
- * @a: an arbitrary Point
- * @b: an arbitrary Point
+ * @a: an arbitrary GeglPathPoint
+ * @b: an arbitrary GeglPathPoint
  *
- * Compute the distance between #Point @a and @b
+ * Compute the distance between #GeglPathPoint @a and @b
  */
-gdouble               gegl_path_point_dist    (Point            *a,
-                                               Point            *b);
+gdouble               gegl_path_point_dist    (GeglPathPoint       *a,
+                                               GeglPathPoint       *b);
 
 G_END_DECLS
 
diff --git a/operations/external/path.c b/operations/external/path.c
index 27fbc2c..0684d27 100644
--- a/operations/external/path.c
+++ b/operations/external/path.c
@@ -144,7 +144,7 @@ gegl_path_stroke (GeglBuffer *buffer,
             break;
           case 'L':
             {
-              Point a,b;
+              GeglPathPoint a,b;
 
               gfloat spacing;
               gfloat local_pos;
@@ -174,7 +174,7 @@ gegl_path_stroke (GeglBuffer *buffer,
                      local_pos <= distance;
                      local_pos += spacing)
                   {
-                    Point spot;
+                    GeglPathPoint spot;
                     gfloat ratio = local_pos / distance;
                     gfloat radius = linewidth/2;
 
diff --git a/operations/workshop/warp.c b/operations/workshop/warp.c
index f712680..00fad21 100644
--- a/operations/workshop/warp.c
+++ b/operations/workshop/warp.c
@@ -315,7 +315,7 @@ process (GeglOperation       *operation,
   gdouble              stamps;
   gdouble              spacing = MAX (o->size * 0.01, 0.5); /*1% spacing for starters*/
 
-  Point                prev, next, lerp;
+  GeglPathPoint        prev, next, lerp;
   gulong               i;
   GeglPathList        *event;
 



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