[gimp] libgimp: remove deprecated GimpPixelRgn functions which are now unused



commit 68afcf7001169ffe0ea3671c5214967b84080977
Author: Michael Natterer <mitch gimp org>
Date:   Fri Jul 19 15:57:52 2019 +0200

    libgimp: remove deprecated GimpPixelRgn functions which are now unused

 libgimp/gimp.def       |   4 -
 libgimp/gimppixelrgn.c | 193 -------------------------------------------------
 libgimp/gimppixelrgn.h |  22 ------
 3 files changed, 219 deletions(-)
---
diff --git a/libgimp/gimp.def b/libgimp/gimp.def
index 7f1d2739c0..b9b1313ad1 100644
--- a/libgimp/gimp.def
+++ b/libgimp/gimp.def
@@ -589,13 +589,9 @@ EXPORTS
        gimp_patterns_refresh
        gimp_patterns_set_popup
        gimp_pencil
-       gimp_pixel_rgn_get_col
-       gimp_pixel_rgn_get_pixel
        gimp_pixel_rgn_get_rect
        gimp_pixel_rgn_get_row
        gimp_pixel_rgn_init
-       gimp_pixel_rgn_set_col
-       gimp_pixel_rgn_set_pixel
        gimp_pixel_rgn_set_rect
        gimp_pixel_rgn_set_row
        gimp_pixel_rgns_process
diff --git a/libgimp/gimppixelrgn.c b/libgimp/gimppixelrgn.c
index 324053b5f1..0330d9866f 100644
--- a/libgimp/gimppixelrgn.c
+++ b/libgimp/gimppixelrgn.c
@@ -159,45 +159,6 @@ gimp_drawable_get_tile2 (GimpDrawable *drawable,
   return gimp_drawable_get_tile (drawable, shadow, row, col);
 }
 
-/**
- * gimp_pixel_rgn_get_pixel:
- * @pr:    a pointer to a previously initialized #GimpPixelRgn.
- * @buf:   a pointer to an array of #guchar
- * @x:     the x coordinate of the wanted pixel (relative to the drawable)
- * @y:     the y coordinate of the wanted pixel (relative to the drawable)
- *
- * Fill the buffer pointed by @buf with the value of the pixel at (@x, @y)
- * in the region @pr. @buf should be large enough to hold the pixel value
- * (1 #guchar for an indexed or grayscale drawable, 2 #guchar for
- * indexed with alpha or grayscale with alpha drawable, 3 #guchar for
- * rgb drawable and 4 #guchar for rgb with alpha drawable.
- **/
-void
-gimp_pixel_rgn_get_pixel (GimpPixelRgn *pr,
-                          guchar       *buf,
-                          gint          x,
-                          gint          y)
-{
-  GimpTile     *tile;
-  const guchar *tile_data;
-  gint          b;
-
-  g_return_if_fail (pr != NULL && pr->drawable != NULL);
-  g_return_if_fail (x >= 0 && x < pr->drawable->width);
-  g_return_if_fail (y >= 0 && y < pr->drawable->height);
-
-  tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
-  _gimp_tile_ref (tile);
-
-  tile_data = (tile->data +
-               tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH)));
-
-  for (b = 0; b < tile->bpp; b++)
-    *buf++ = *tile_data++;
-
-  _gimp_tile_unref (tile, FALSE);
-}
-
 /**
  * gimp_pixel_rgn_get_row:
  * @pr:     a pointer to a previously initialized #GimpPixelRgn.
@@ -254,65 +215,6 @@ gimp_pixel_rgn_get_row (GimpPixelRgn *pr,
     }
 }
 
-/**
- * gimp_pixel_rgn_get_col:
- * @pr:     a pointer to a previously initialized #GimpPixelRgn.
- * @buf:    a pointer to an array of #guchar
- * @x:      the x coordinate of the first pixel (relative to the drawable).
- * @y:      the y coordinate of the first pixel (relative to the drawable).
- * @height: the number of pixels to get.
- *
- * Get several pixels of a region's column. This function fills the buffer
- * @buf with the values of the pixels from (@x, @y) to (@x, @y+@height-1).
- * @buf should be large enough to hold all these values.
- *
- **/
-void
-gimp_pixel_rgn_get_col (GimpPixelRgn *pr,
-                        guchar       *buf,
-                        gint          x,
-                        gint          y,
-                        gint          height)
-{
-  gint end;
-
-  g_return_if_fail (pr != NULL && pr->drawable != NULL);
-  g_return_if_fail (buf != NULL);
-  g_return_if_fail (x >= 0 && x < pr->drawable->width);
-  g_return_if_fail (y >= 0 && y + height <= pr->drawable->height);
-  g_return_if_fail (height >= 0);
-
-  end = y + height;
-
-  while (y < end)
-    {
-      GimpTile     *tile;
-      const guchar *tile_data;
-      gint          inc;
-      gint          boundary;
-      gint          b;
-
-      tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
-      _gimp_tile_ref (tile);
-
-      tile_data = (tile->data +
-                   tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH)));
-
-      boundary = y + (tile->eheight - (y % TILE_HEIGHT));
-      inc = tile->bpp * tile->ewidth;
-
-      for ( ; y < end && y < boundary; y++)
-        {
-          for (b = 0; b < tile->bpp; b++)
-            *buf++ = tile_data[b];
-
-          tile_data += inc;
-        }
-
-      _gimp_tile_unref (tile, FALSE);
-    }
-}
-
 /**
  * gimp_pixel_rgn_get_rect:
  * @pr:     a pointer to a previously initialized #GimpPixelRgn.
@@ -397,42 +299,6 @@ gimp_pixel_rgn_get_rect (GimpPixelRgn *pr,
     }
 }
 
-/**
- * gimp_pixel_rgn_set_pixel:
- * @pr:   a pointer to a previously initialized #GimpPixelRgn.
- * @buf:  a pointer to an array of #guchar.
- * @x:    the x coordinate of the pixel (relative to the drawable).
- * @y:    the y coordinate of the pixel (relative to the drawable).
- *
- * Set the pixel at (@x, @y) to the values from @buf.
- **/
-void
-gimp_pixel_rgn_set_pixel (GimpPixelRgn *pr,
-                          const guchar *buf,
-                          gint          x,
-                          gint          y)
-{
-  GimpTile *tile;
-  guchar   *tile_data;
-  gint      b;
-
-  g_return_if_fail (pr != NULL && pr->drawable != NULL);
-  g_return_if_fail (buf != NULL);
-  g_return_if_fail (x >= 0 && x < pr->drawable->width);
-  g_return_if_fail (y >= 0 && y < pr->drawable->height);
-
-  tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
-  _gimp_tile_ref (tile);
-
-  tile_data = tile->data + tile->bpp * (tile->ewidth *
-                                        (y % TILE_HEIGHT) + (x % TILE_WIDTH));
-
-  for (b = 0; b < tile->bpp; b++)
-    *tile_data++ = *buf++;
-
-  _gimp_tile_unref (tile, TRUE);
-}
-
 /**
  * gimp_pixel_rgn_set_row:
  * @pr:     a pointer to a previously initialized #GimpPixelRgn.
@@ -488,65 +354,6 @@ gimp_pixel_rgn_set_row (GimpPixelRgn *pr,
     }
 }
 
-/**
- * gimp_pixel_rgn_set_col:
- * @pr:     a pointer to a previously initialized #GimpPixelRgn.
- * @buf:    a pointer to an array of #guchar
- * @x:      the x coordinate of the first pixel (relative to the drawable).
- * @y:      the y coordinate of the first pixel (relative to the drawable).
- * @height: the number of pixels to set.
- *
- * Set several pixels of a region's column. This function draws the pixels
- * from (@x, @y) to (@x, @y+@height-1) using the values from the buffer @buf.
- * @buf should be large enough to hold all these values.
- **/
-void
-gimp_pixel_rgn_set_col (GimpPixelRgn *pr,
-                        const guchar *buf,
-                        gint          x,
-                        gint          y,
-                        gint          height)
-{
-  gint      end;
-
-  g_return_if_fail (pr != NULL && pr->drawable != NULL);
-  g_return_if_fail (buf != NULL);
-  g_return_if_fail (x >= 0 && x < pr->drawable->width);
-  g_return_if_fail (y >= 0 && y + height <= pr->drawable->height);
-  g_return_if_fail (height >= 0);
-
-  end = y + height;
-
-  while (y < end)
-    {
-      GimpTile *tile;
-      guchar   *tile_data;
-      gint      inc;
-      gint      boundary;
-
-      tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
-      _gimp_tile_ref (tile);
-
-      tile_data = (tile->data +
-                   tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH)));
-
-      boundary = y + (tile->eheight - (y % TILE_HEIGHT));
-      inc = tile->bpp * tile->ewidth;
-
-      for ( ; y < end && y < boundary; y++)
-        {
-          gint b;
-
-          for (b = 0; b < tile->bpp; b++)
-            tile_data[b] = *buf++;
-
-          tile_data += inc;
-        }
-
-      _gimp_tile_unref (tile, TRUE);
-    }
-}
-
 /**
  * gimp_pixel_rgn_set_rect:
  * @pr:     a pointer to a previously initialized #GimpPixelRgn.
diff --git a/libgimp/gimppixelrgn.h b/libgimp/gimppixelrgn.h
index d6a6d17d0b..a9026c9874 100644
--- a/libgimp/gimppixelrgn.h
+++ b/libgimp/gimppixelrgn.h
@@ -53,11 +53,6 @@ void      gimp_pixel_rgn_init       (GimpPixelRgn  *pr,
                                      gint           height,
                                      gint           dirty,
                                      gint           shadow);
-GIMP_DEPRECATED_FOR(gegl_buffer_sample)
-void      gimp_pixel_rgn_get_pixel  (GimpPixelRgn  *pr,
-                                     guchar        *buf,
-                                     gint           x,
-                                     gint           y);
 GIMP_DEPRECATED_FOR(gegl_buffer_get)
 void      gimp_pixel_rgn_get_row    (GimpPixelRgn  *pr,
                                      guchar        *buf,
@@ -65,12 +60,6 @@ void      gimp_pixel_rgn_get_row    (GimpPixelRgn  *pr,
                                      gint           y,
                                      gint           width);
 GIMP_DEPRECATED_FOR(gegl_buffer_get)
-void      gimp_pixel_rgn_get_col    (GimpPixelRgn  *pr,
-                                     guchar        *buf,
-                                     gint           x,
-                                     gint           y,
-                                     gint           height);
-GIMP_DEPRECATED_FOR(gegl_buffer_get)
 void      gimp_pixel_rgn_get_rect   (GimpPixelRgn  *pr,
                                      guchar        *buf,
                                      gint           x,
@@ -78,23 +67,12 @@ void      gimp_pixel_rgn_get_rect   (GimpPixelRgn  *pr,
                                      gint           width,
                                      gint           height);
 GIMP_DEPRECATED_FOR(gegl_buffer_set)
-void      gimp_pixel_rgn_set_pixel  (GimpPixelRgn  *pr,
-                                     const guchar  *buf,
-                                     gint           x,
-                                     gint           y);
-GIMP_DEPRECATED_FOR(gegl_buffer_set)
 void      gimp_pixel_rgn_set_row    (GimpPixelRgn  *pr,
                                      const guchar  *buf,
                                      gint           x,
                                      gint           y,
                                      gint           width);
 GIMP_DEPRECATED_FOR(gegl_buffer_set)
-void      gimp_pixel_rgn_set_col    (GimpPixelRgn  *pr,
-                                     const guchar  *buf,
-                                     gint           x,
-                                     gint           y,
-                                     gint           height);
-GIMP_DEPRECATED_FOR(gegl_buffer_set)
 void      gimp_pixel_rgn_set_rect   (GimpPixelRgn  *pr,
                                      const guchar  *buf,
                                      gint           x,


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