[gimp] app: remove unused function temp_buf_new_check()



commit 2281645f5b5a391656629fa54e5b21487607bed4
Author: Michael Natterer <mitch gimp org>
Date:   Tue Mar 8 16:50:58 2011 +0100

    app: remove unused function temp_buf_new_check()

 app/base/temp-buf.c |   63 ---------------------------------------------------
 app/base/temp-buf.h |    4 ---
 2 files changed, 0 insertions(+), 67 deletions(-)
---
diff --git a/app/base/temp-buf.c b/app/base/temp-buf.c
index ebc00c3..3cab805 100644
--- a/app/base/temp-buf.c
+++ b/app/base/temp-buf.c
@@ -26,7 +26,6 @@
 #include <glib-object.h>
 #include <glib/gstdio.h>
 
-#include "libgimpbase/gimpbase.h"
 #include "libgimpcolor/gimpcolor.h"
 
 #include "base-types.h"
@@ -110,68 +109,6 @@ temp_buf_new (gint          width,
   return temp;
 }
 
-/* This function simply renders a checkerboard with the given
-   parameters into a newly allocated RGB tempbuf */
-
-TempBuf *
-temp_buf_new_check (gint           width,
-                    gint           height,
-                    GimpCheckType  check_type,
-                    GimpCheckSize  check_size)
-{
-  TempBuf *new;
-  guchar  *data;
-  guchar   check_shift = 0;
-  guchar   check_mod   = 0;
-  guchar   check_light = 0;
-  guchar   check_dark  = 0;
-  gint     x, y;
-
-  g_return_val_if_fail (width > 0 && height > 0, NULL);
-
-  switch (check_size)
-    {
-    case GIMP_CHECK_SIZE_SMALL_CHECKS:
-      check_mod   = 0x3;
-      check_shift = 2;
-      break;
-    case GIMP_CHECK_SIZE_MEDIUM_CHECKS:
-      check_mod   = 0x7;
-      check_shift = 3;
-      break;
-    case GIMP_CHECK_SIZE_LARGE_CHECKS:
-      check_mod   = 0xf;
-      check_shift = 4;
-      break;
-    }
-
-  gimp_checks_get_shades (check_type, &check_light, &check_dark);
-
-  new = temp_buf_new (width, height, 3, 0, 0, NULL);
-  data = temp_buf_get_data (new);
-
-  for (y = 0; y < height; y++)
-    {
-      guchar check_dark = y >> check_shift;
-      guchar color      = (check_dark & 0x1) ? check_light : check_dark;
-
-      for (x = 0; x < width; x++)
-        {
-          *data++ = color;
-          *data++ = color;
-          *data++ = color;
-
-          if (((x + 1) & check_mod) == 0)
-            {
-              check_dark += 1;
-              color = (check_dark & 0x1) ? check_light : check_dark;
-            }
-        }
-    }
-
-  return new;
-}
-
 TempBuf *
 temp_buf_copy (TempBuf *src,
                TempBuf *dest)
diff --git a/app/base/temp-buf.h b/app/base/temp-buf.h
index a6f9b6b..c4f33c5 100644
--- a/app/base/temp-buf.h
+++ b/app/base/temp-buf.h
@@ -38,10 +38,6 @@ TempBuf * temp_buf_new           (gint           width,
                                   gint           x,
                                   gint           y,
                                   const guchar  *color);
-TempBuf * temp_buf_new_check     (gint           width,
-                                  gint           height,
-                                  GimpCheckType  check_type,
-                                  GimpCheckSize  check_size);
 TempBuf * temp_buf_copy          (TempBuf       *src,
                                   TempBuf       *dest);
 TempBuf * temp_buf_resize        (TempBuf       *buf,



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