[gegl/npd-squashed: 6/17] npd: mark more functions as static



commit fbf5a3f277fce555bac5b55d46ce3ea72ecd05aa
Author: Marek Dvoroznak <dvoromar gmail com>
Date:   Mon Dec 2 02:43:38 2013 +0100

    npd: mark more functions as static

 libs/npd/graphics.c |  555 ++++++++++++++++++++++++++-------------------------
 libs/npd/graphics.h |   61 +-----
 2 files changed, 293 insertions(+), 323 deletions(-)
---
diff --git a/libs/npd/graphics.c b/libs/npd/graphics.c
index 4d855a8..8ca26a3 100644
--- a/libs/npd/graphics.c
+++ b/libs/npd/graphics.c
@@ -27,219 +27,7 @@
 #include <stdio.h>
 #include <string.h>
 
-void
-npd_create_mesh_from_image (NPDModel *model,
-                            gint      width,
-                            gint      height,
-                            gint      position_x,
-                            gint      position_y)
-{
-  gint      square_size = model->mesh_square_size;
-  NPDImage *image = model->reference_image;
-  gint      i, cy, cx, y, x, r, c, ow, oh;
-  NPDColor  pixel_color = { 0, 0, 0, 0 };
-  GArray   *squares;
-  gint     *sq2id;
-  gboolean *empty_squares;
-  GList    *tmp_ops = NULL;
-  GArray   *ops = g_array_new (FALSE, FALSE, sizeof (NPDOverlappingPoints));
-  GList   **edges;
-  NPDHiddenModel *hm = model->hidden_model;
-
-  /* create squares above the image */
-  width  = ceil ((gfloat) width  / square_size);
-  height = ceil ((gfloat) height / square_size);
-
-  squares = g_array_new (FALSE, FALSE, sizeof (NPDBone));
-  empty_squares = g_new0 (gboolean, width * height);
-  sq2id = g_new0 (gint, width * height);
-
-  i = 0;
-  for (cy = 0; cy < height; cy++)
-  for (cx = 0; cx < width; cx++)
-    {
-      gboolean is_empty = TRUE;
-
-      for (y = cy * square_size; y < (cy + 1) * square_size; y++)
-      for (x = cx * square_size; x < (cx + 1) * square_size; x++)
-        {
-          /* test of emptiness */
-          npd_get_pixel_color (image, x, y, &pixel_color);
-          if (!npd_is_color_transparent (&pixel_color))
-            {
-              is_empty = FALSE;
-              goto not_empty;
-            }
-        }
-
-#define NPD_SQ_ID cy * width + cx
-
-      not_empty:
-      if (!is_empty)
-        {
-          /* create a square */
-          NPDBone square;
-          npd_create_square (&square,
-                             position_x + cx * square_size,
-                             position_y + cy * square_size,
-                             square_size, square_size);
-          g_array_append_val (squares, square);
-          sq2id[NPD_SQ_ID] = i;
-          i++;
-        }
-      else
-        empty_squares[NPD_SQ_ID] = TRUE;
-    }
-
-  /* find empty edges */
-  edges = npd_find_edges (model->reference_image, width, height, square_size);
-
-  /* create provisional overlapping points */
-#define NPD_ADD_P(op,r,c,point)                                              \
-  if ((r) > -1 && (r) < (oh - 1) && (c) > -1 && (c) < (ow - 1) &&            \
-      edges[op] == NULL && !empty_squares[(r) * width + (c)])                \
-    {                                                                        \
-      tmp_ops = g_list_append (tmp_ops, GINT_TO_POINTER ((r) * width + (c)));\
-      tmp_ops = g_list_append (tmp_ops, GINT_TO_POINTER (point));            \
-      num++;                                                                 \
-    }
-
-  ow = width + 1; oh = height + 1;
-
-  for (r = 0; r < oh; r++)
-  for (c = 0; c < ow; c++)
-    {
-      gint index = r * ow + c, num = 0;
-      NPD_ADD_P (index, r - 1, c - 1, 2);
-      NPD_ADD_P (index, r - 1, c,     3);
-      NPD_ADD_P (index, r,     c,     0);
-      NPD_ADD_P (index, r,     c - 1, 1);
-      if (num > 0)
-        tmp_ops = g_list_insert_before (tmp_ops,
-                                        g_list_nth_prev (g_list_last (tmp_ops), 2 * num - 1),
-                                        GINT_TO_POINTER (num));
-    }
-#undef NPD_ADD_P
-
-  /* cut lattice's edges and continue with creating of provisional overlapping points */
-  tmp_ops = g_list_concat (tmp_ops, npd_cut_edges (edges, ow, oh));
-  for (i = 0; i < ow * oh; i++) g_list_free (edges[i]);
-  g_free (edges);
-
-  /* create model's bones */
-  hm->num_of_bones = squares->len;
-  hm->current_bones = (NPDBone*) (gpointer) squares->data;
-  g_array_free (squares, FALSE);
-
-  /* create model's overlapping points */
-  while (g_list_next (tmp_ops))
-    {
-      GPtrArray *ppts = g_ptr_array_new ();
-      gint count = GPOINTER_TO_INT (tmp_ops->data);
-      gint j = 0;
-
-      for (i = 0; i < count; i++)
-        {
-          gint sq, p;
-          tmp_ops = g_list_next (tmp_ops);
-          sq = GPOINTER_TO_INT (tmp_ops->data);
-          tmp_ops = g_list_next (tmp_ops);
-          p  = GPOINTER_TO_INT (tmp_ops->data);
-
-          if (!empty_squares[sq])
-            {
-              g_ptr_array_add (ppts, &hm->current_bones[sq2id[sq]].points[p]);
-              j++;
-            }
-        }
-
-      if (j > 0)
-        {
-          NPDOverlappingPoints op;
-          op.num_of_points = j;
-          op.points = (NPDPoint**) ppts->pdata;
-          g_ptr_array_free (ppts, FALSE);
-          op.representative = op.points[0];
-          g_array_append_val (ops, op);
-        }
-      tmp_ops = g_list_next (tmp_ops);
-    }
-
-  g_list_free (tmp_ops);
-  g_free (empty_squares);
-  g_free (sq2id);
-
-  hm->num_of_overlapping_points = ops->len;
-  hm->list_of_overlapping_points = (NPDOverlappingPoints*) (gpointer) ops->data;
-  g_array_free (ops, FALSE);
-
-  /* create reference bones according to current bones */
-  hm->reference_bones = g_new (NPDBone, hm->num_of_bones);
-  for (i = 0; i < hm->num_of_bones; i++)
-    {
-      NPDBone *current_bone = &hm->current_bones[i];
-      NPDBone *reference_bone = &hm->reference_bones[i];
-      NPDPoint *current_points, *ref_points;
-      gint j, n = current_bone->num_of_points;
-
-      reference_bone->num_of_points = n;
-      reference_bone->points = g_new (NPDPoint, n);
-      memcpy (reference_bone->points, current_bone->points, n * sizeof (NPDPoint));
-      reference_bone->weights = current_bone->weights;
-
-      current_points = current_bone->points;
-      ref_points = reference_bone->points;
-
-      for (j = 0; j < n; j++)
-        {
-          current_points[j].current_bone = current_bone;
-          current_points[j].reference_bone = reference_bone;
-          ref_points[j].current_bone = current_bone;
-          ref_points[j].reference_bone = reference_bone;
-          ref_points[j].x = current_points[j].x - position_x;
-          ref_points[j].y = current_points[j].y - position_y;
-          current_points[j].counterpart = &ref_points[j];
-          ref_points[j].counterpart = &current_points[j];
-        }
-    }
-
-/*
-// could be useful later
-  gint j;
-  for (i = 0; i < hm->num_of_overlapping_points; i++)
-  for (j = 0; j < hm->list_of_overlapping_points[i].num_of_points; j++)
-    {
-      NPDPoint *p = hm->list_of_overlapping_points[i].points[j];
-      p->overlapping_points = &hm->list_of_overlapping_points[i];
-      p->counterpart->overlapping_points = &hm->list_of_overlapping_points[i];
-    }
-*/
-}
-
-void
-npd_draw_mesh (NPDModel   *model,
-               NPDDisplay *display)
-{
-  NPDHiddenModel *hm = model->hidden_model;
-  gint i, j;
-
-  for (i = 0; i < hm->num_of_bones; i++)
-    {
-      NPDBone  *bone  = &hm->current_bones[i];
-      NPDPoint *first = &bone->points[0];
-      NPDPoint *p0, *p1 = NULL;
-
-      for (j = 1; j < bone->num_of_points; j++)
-        {
-          p0 = &bone->points[j - 1];
-          p1 = &bone->points[j];
-          npd_draw_line (display, p0->x, p0->y, p1->x, p1->y);
-        }
-      npd_draw_line (display, p1->x, p1->y, first->x, first->y);
-    }
-}
-
-gfloat
+static gfloat
 npd_bilinear_interpolation (gfloat I0,
                             gfloat I1,
                             gfloat I2,
@@ -251,7 +39,7 @@ npd_bilinear_interpolation (gfloat I0,
          (I2 * (1 - dx) + I3 * dx) *      dy;
 }
 
-void
+static void
 npd_bilinear_color_interpolation (NPDColor *I0,
                                   NPDColor *I1,
                                   NPDColor *I2,
@@ -266,7 +54,7 @@ npd_bilinear_color_interpolation (NPDColor *I0,
   out->a = npd_bilinear_interpolation (I0->a, I1->a, I2->a, I3->a, dx, dy);
 }
 
-gfloat
+static gfloat
 npd_blend_band (gfloat src,
                 gfloat dst,
                 gfloat src_alpha,
@@ -277,7 +65,7 @@ npd_blend_band (gfloat src,
           dst * dst_alpha * (1 - src_alpha)) * out_alpha_recip;
 }
 
-void
+static void
 npd_blend_colors (NPDColor *src,
                   NPDColor *dst,
                   NPDColor *out_color)
@@ -302,7 +90,60 @@ npd_blend_colors (NPDColor *src,
 #endif
 }
 
-void
+static void
+npd_draw_texture_line (gint        x1,
+                       gint        x2,
+                       gint        y,
+                       NPDMatrix  *A,
+                       NPDImage   *input_image,
+                       NPDImage   *output_image,
+                       NPDSettings settings)
+{
+  gint x, fx, fy;
+  gfloat dx, dy;
+
+  for (x = x1; x <= x2; x++)
+    {
+      NPDPoint p, q;
+      NPDColor I0, interpolated, *final;
+
+      q.x = x; q.y = y;
+      npd_apply_transformation (A, &q, &p);
+
+      fx = floor (p.x);
+      fy = floor (p.y);
+
+      npd_get_pixel_color (input_image, fx, fy, &I0);
+      final = &I0;
+
+      /* bilinear interpolation */
+      if (settings & NPD_BILINEAR_INTERPOLATION)
+        {
+          NPDColor I1, I2, I3;
+
+          dx =  p.x - fx;
+          dy =  p.y - fy;
+
+          npd_get_pixel_color (input_image, fx + 1, fy,     &I1);
+          npd_get_pixel_color (input_image, fx,     fy + 1, &I2);
+          npd_get_pixel_color (input_image, fx + 1, fy + 1, &I3);
+          npd_bilinear_color_interpolation (&I0, &I1, &I2, &I3, dx, dy, &interpolated);
+          final = &interpolated;
+        }
+
+      /* alpha blending */
+      if (settings & NPD_ALPHA_BLENDING)
+        {
+          NPDColor dest;
+          npd_get_pixel_color (output_image, x, y, &dest);
+          npd_blend_colors (final, &dest, final);
+        }
+
+      npd_set_pixel_color (output_image, x, y, final);
+    }
+}
+
+static void
 npd_texture_fill_triangle (gint       x1,
                            gint       y1,
                            gint       x2,
@@ -447,7 +288,7 @@ npd_texture_fill_triangle (gint       x1,
     }
 }
 
-void
+static void
 npd_texture_quadrilateral (NPDBone    *reference_bone,
                            NPDBone    *current_bone,
                            NPDImage   *input_image,
@@ -478,76 +319,256 @@ npd_texture_quadrilateral (NPDBone    *reference_bone,
 }
 
 void
-npd_draw_texture_line (gint        x1,
-                       gint        x2,
-                       gint        y,
-                       NPDMatrix  *A,
-                       NPDImage   *input_image,
-                       NPDImage   *output_image,
-                       NPDSettings settings)
+npd_draw_model_into_image (NPDModel *model,
+                           NPDImage *image)
 {
-  gint x, fx, fy;
-  gfloat dx, dy;
-  
-  for (x = x1; x <= x2; x++)
+  NPDHiddenModel *hm = model->hidden_model;
+  gint i;
+
+  for (i = 0; i < hm->num_of_bones; i++)
     {
-      NPDPoint p, q;
-      NPDColor I0, interpolated, *final;
+      npd_texture_quadrilateral (&hm->reference_bones[i],
+                                 &hm->current_bones[i],
+                                  model->reference_image,
+                                  image,
+                                  NPD_BILINEAR_INTERPOLATION | NPD_ALPHA_BLENDING);
+    }
+}
 
-      q.x = x; q.y = y;
-      npd_apply_transformation (A, &q, &p);
+gboolean
+npd_is_color_transparent (NPDColor *color)
+{
+  if (npd_equal_floats (color->a, 0.0))
+    return TRUE;
 
-      fx = floor (p.x);
-      fy = floor (p.y);
+  return FALSE;
+}
 
-      npd_get_pixel_color (input_image, fx, fy, &I0);
-      final = &I0;
+static void
+npd_create_mesh (NPDModel *model,
+                 gint      width,
+                 gint      height,
+                 gint      position_x,
+                 gint      position_y)
+{
+  gint      square_size = model->mesh_square_size;
+  NPDImage *image = model->reference_image;
+  gint      i, cy, cx, y, x, r, c, ow, oh;
+  NPDColor  pixel_color = { 0, 0, 0, 0 };
+  GArray   *squares;
+  gint     *sq2id;
+  gboolean *empty_squares;
+  GList    *tmp_ops = NULL;
+  GArray   *ops = g_array_new (FALSE, FALSE, sizeof (NPDOverlappingPoints));
+  GList   **edges;
+  NPDHiddenModel *hm = model->hidden_model;
 
-      /* bilinear interpolation */
-      if (settings & NPD_BILINEAR_INTERPOLATION)
+  /* create squares above the image */
+  width  = ceil ((gfloat) width  / square_size);
+  height = ceil ((gfloat) height / square_size);
+
+  squares = g_array_new (FALSE, FALSE, sizeof (NPDBone));
+  empty_squares = g_new0 (gboolean, width * height);
+  sq2id = g_new0 (gint, width * height);
+
+  i = 0;
+  for (cy = 0; cy < height; cy++)
+  for (cx = 0; cx < width; cx++)
+    {
+      gboolean is_empty = TRUE;
+
+      for (y = cy * square_size; y < (cy + 1) * square_size; y++)
+      for (x = cx * square_size; x < (cx + 1) * square_size; x++)
         {
-          NPDColor I1, I2, I3;
+          /* test of emptiness */
+          npd_get_pixel_color (image, x, y, &pixel_color);
+          if (!npd_is_color_transparent (&pixel_color))
+            {
+              is_empty = FALSE;
+              goto not_empty;
+            }
+        }
 
-          dx =  p.x - fx;
-          dy =  p.y - fy;
+#define NPD_SQ_ID cy * width + cx
 
-          npd_get_pixel_color (input_image, fx + 1, fy,     &I1);
-          npd_get_pixel_color (input_image, fx,     fy + 1, &I2);
-          npd_get_pixel_color (input_image, fx + 1, fy + 1, &I3);
-          npd_bilinear_color_interpolation (&I0, &I1, &I2, &I3, dx, dy, &interpolated);
-          final = &interpolated;
+      not_empty:
+      if (!is_empty)
+        {
+          /* create a square */
+          NPDBone square;
+          npd_create_square (&square,
+                             position_x + cx * square_size,
+                             position_y + cy * square_size,
+                             square_size, square_size);
+          g_array_append_val (squares, square);
+          sq2id[NPD_SQ_ID] = i;
+          i++;
         }
+      else
+        empty_squares[NPD_SQ_ID] = TRUE;
+    }
 
-      /* alpha blending */
-      if (settings & NPD_ALPHA_BLENDING)
+  /* find empty edges */
+  edges = npd_find_edges (model->reference_image, width, height, square_size);
+
+  /* create provisional overlapping points */
+#define NPD_ADD_P(op,r,c,point)                                              \
+  if ((r) > -1 && (r) < (oh - 1) && (c) > -1 && (c) < (ow - 1) &&            \
+      edges[op] == NULL && !empty_squares[(r) * width + (c)])                \
+    {                                                                        \
+      tmp_ops = g_list_append (tmp_ops, GINT_TO_POINTER ((r) * width + (c)));\
+      tmp_ops = g_list_append (tmp_ops, GINT_TO_POINTER (point));            \
+      num++;                                                                 \
+    }
+
+  ow = width + 1; oh = height + 1;
+
+  for (r = 0; r < oh; r++)
+  for (c = 0; c < ow; c++)
+    {
+      gint index = r * ow + c, num = 0;
+      NPD_ADD_P (index, r - 1, c - 1, 2);
+      NPD_ADD_P (index, r - 1, c,     3);
+      NPD_ADD_P (index, r,     c,     0);
+      NPD_ADD_P (index, r,     c - 1, 1);
+      if (num > 0)
+        tmp_ops = g_list_insert_before (tmp_ops,
+                                        g_list_nth_prev (g_list_last (tmp_ops), 2 * num - 1),
+                                        GINT_TO_POINTER (num));
+    }
+#undef NPD_ADD_P
+
+  /* cut lattice's edges and continue with creating of provisional overlapping points */
+  tmp_ops = g_list_concat (tmp_ops, npd_cut_edges (edges, ow, oh));
+  for (i = 0; i < ow * oh; i++) g_list_free (edges[i]);
+  g_free (edges);
+
+  /* create model's bones */
+  hm->num_of_bones = squares->len;
+  hm->current_bones = (NPDBone*) (gpointer) squares->data;
+  g_array_free (squares, FALSE);
+
+  /* create model's overlapping points */
+  while (g_list_next (tmp_ops))
+    {
+      GPtrArray *ppts = g_ptr_array_new ();
+      gint count = GPOINTER_TO_INT (tmp_ops->data);
+      gint j = 0;
+
+      for (i = 0; i < count; i++)
         {
-          NPDColor dest;
-          npd_get_pixel_color (output_image, x, y, &dest);
-          npd_blend_colors (final, &dest, final);
+          gint sq, p;
+          tmp_ops = g_list_next (tmp_ops);
+          sq = GPOINTER_TO_INT (tmp_ops->data);
+          tmp_ops = g_list_next (tmp_ops);
+          p  = GPOINTER_TO_INT (tmp_ops->data);
+
+          if (!empty_squares[sq])
+            {
+              g_ptr_array_add (ppts, &hm->current_bones[sq2id[sq]].points[p]);
+              j++;
+            }
         }
 
-      npd_set_pixel_color (output_image, x, y, final);
+      if (j > 0)
+        {
+          NPDOverlappingPoints op;
+          op.num_of_points = j;
+          op.points = (NPDPoint**) ppts->pdata;
+          g_ptr_array_free (ppts, FALSE);
+          op.representative = op.points[0];
+          g_array_append_val (ops, op);
+        }
+      tmp_ops = g_list_next (tmp_ops);
+    }
+
+  g_list_free (tmp_ops);
+  g_free (empty_squares);
+  g_free (sq2id);
+
+  hm->num_of_overlapping_points = ops->len;
+  hm->list_of_overlapping_points = (NPDOverlappingPoints*) (gpointer) ops->data;
+  g_array_free (ops, FALSE);
+
+  /* create reference bones according to current bones */
+  hm->reference_bones = g_new (NPDBone, hm->num_of_bones);
+  for (i = 0; i < hm->num_of_bones; i++)
+    {
+      NPDBone *current_bone = &hm->current_bones[i];
+      NPDBone *reference_bone = &hm->reference_bones[i];
+      NPDPoint *current_points, *ref_points;
+      gint j, n = current_bone->num_of_points;
+
+      reference_bone->num_of_points = n;
+      reference_bone->points = g_new (NPDPoint, n);
+      memcpy (reference_bone->points, current_bone->points, n * sizeof (NPDPoint));
+      reference_bone->weights = current_bone->weights;
+
+      current_points = current_bone->points;
+      ref_points = reference_bone->points;
+
+      for (j = 0; j < n; j++)
+        {
+          current_points[j].current_bone = current_bone;
+          current_points[j].reference_bone = reference_bone;
+          ref_points[j].current_bone = current_bone;
+          ref_points[j].reference_bone = reference_bone;
+          ref_points[j].x = current_points[j].x - position_x;
+          ref_points[j].y = current_points[j].y - position_y;
+          current_points[j].counterpart = &ref_points[j];
+          ref_points[j].counterpart = &current_points[j];
+        }
     }
+
+#if 0
+  /* could be useful later */
+  gint j;
+  for (i = 0; i < hm->num_of_overlapping_points; i++)
+  for (j = 0; j < hm->list_of_overlapping_points[i].num_of_points; j++)
+    {
+      NPDPoint *p = hm->list_of_overlapping_points[i].points[j];
+      p->overlapping_points = &hm->list_of_overlapping_points[i];
+      p->counterpart->overlapping_points = &hm->list_of_overlapping_points[i];
+    }
+#endif
 }
 
-gboolean
-npd_compare_colors (NPDColor *c1,
-                    NPDColor *c2)
+void
+npd_create_model_from_image (NPDModel  *model,
+                             NPDImage  *image,
+                             gint       width,
+                             gint       height,
+                             gint       position_x,
+                             gint       position_y,
+                             gint       square_size)
 {
-  if (npd_equal_floats (c1->r, c2->r) &&
-      npd_equal_floats (c1->g, c2->g) &&
-      npd_equal_floats (c1->b, c2->b) &&
-      npd_equal_floats (c1->a, c2->a))
-    return TRUE;
+  npd_init_model (model);
+  model->reference_image = image;
+  model->mesh_square_size = square_size;
 
-  return FALSE;
+  npd_create_mesh (model, width, height, position_x, position_y);
 }
 
-gboolean
-npd_is_color_transparent (NPDColor *color)
+
+void
+npd_draw_mesh (NPDModel   *model,
+               NPDDisplay *display)
 {
-  if (npd_equal_floats (color->a, 0.0))
-    return TRUE;
+  NPDHiddenModel *hm = model->hidden_model;
+  gint i, j;
 
-  return FALSE;
+  for (i = 0; i < hm->num_of_bones; i++)
+    {
+      NPDBone  *bone  = &hm->current_bones[i];
+      NPDPoint *first = &bone->points[0];
+      NPDPoint *p0, *p1 = NULL;
+
+      for (j = 1; j < bone->num_of_points; j++)
+        {
+          p0 = &bone->points[j - 1];
+          p1 = &bone->points[j];
+          npd_draw_line (display, p0->x, p0->y, p1->x, p1->y);
+        }
+      npd_draw_line (display, p1->x, p1->y, first->x, first->y);
+    }
 }
diff --git a/libs/npd/graphics.h b/libs/npd/graphics.h
index 457ac80..69c272d 100644
--- a/libs/npd/graphics.h
+++ b/libs/npd/graphics.h
@@ -48,67 +48,21 @@ typedef enum
 
 void        npd_create_model_from_image       (NPDModel   *model,
                                                NPDImage   *image,
-                                               gint        square_size);
-void        npd_create_mesh_from_image        (NPDModel   *model,
                                                gint        width,
                                                gint        height,
                                                gint        position_x,
-                                               gint        position_y);
-void        npd_draw_model                    (NPDModel   *model,
-                                               NPDDisplay *display);
+                                               gint        position_y,
+                                               gint        square_size);
+void        npd_draw_model_into_image         (NPDModel   *model,
+                                               NPDImage   *image);
 void        npd_draw_mesh                     (NPDModel   *model,
                                                NPDDisplay *display);
-
-void        npd_destroy_image                 (NPDImage   *image);
-
-void        npd_texture_fill_triangle         (gint        x1,
-                                               gint        y1,
-                                               gint        x2,
-                                               gint        y2,
-                                               gint        x3,
-                                               gint        y3,
-                                               NPDMatrix  *A,
-                                               NPDImage   *input_image,
-                                               NPDImage   *output_image,
-                                               NPDSettings settings);
-void        npd_texture_quadrilateral         (NPDBone    *reference_bone,
-                                               NPDBone    *current_bone,
-                                               NPDImage   *input_image,
-                                               NPDImage   *output_image,
-                                               NPDSettings settings);
-void        npd_draw_texture_line             (gint        x1,
-                                               gint        x2,
-                                               gint        y,
-                                               NPDMatrix  *A,
-                                               NPDImage   *input_image,
-                                               NPDImage   *output_image,
-                                               NPDSettings settings);
+gboolean    npd_is_color_transparent          (NPDColor *color);
 void      (*npd_draw_line)                    (NPDDisplay *display,
                                                gfloat      x0,
                                                gfloat      y0,
                                                gfloat      x1,
                                                gfloat      y1);
-gfloat      npd_bilinear_interpolation        (gfloat      I0,
-                                               gfloat      I1,
-                                               gfloat      I2,
-                                               gfloat      I3,
-                                               gfloat      dx,
-                                               gfloat      dy);
-void        npd_bilinear_color_interpolation  (NPDColor   *I0,
-                                               NPDColor   *I1,
-                                               NPDColor   *I2,
-                                               NPDColor   *I3,
-                                               gfloat      dx,
-                                               gfloat      dy,
-                                               NPDColor   *out);
-gfloat      npd_blend_band                    (gfloat      src,
-                                               gfloat      dst,
-                                               gfloat      src_alpha,
-                                               gfloat      dest_alpha,
-                                               gfloat      out_alpha);
-void        npd_blend_colors                 (NPDColor   *src,
-                                               NPDColor   *dst,
-                                               NPDColor   *out_color);
 void      (*npd_get_pixel_color)              (NPDImage   *image,
                                                gint        x,
                                                gint        y,
@@ -117,10 +71,5 @@ void      (*npd_set_pixel_color)              (NPDImage   *image,
                                                gint        x,
                                                gint        y,
                                                NPDColor   *color);
-gboolean    npd_compare_colors                (NPDColor   *c1,
-                                               NPDColor   *c2);
-gboolean    npd_is_color_transparent          (NPDColor   *color);
-gboolean    npd_init_display                  (NPDDisplay *display);
-void        npd_destroy_display               (NPDDisplay *display);
 
 #endif /*__NPD_GRAPHICS_H__ */


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