[gimp/goat-invasion: 455/526] app: remove temp_buf_copy_area()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion: 455/526] app: remove temp_buf_copy_area()
- Date: Sun, 22 Apr 2012 13:37:30 +0000 (UTC)
commit b5c2810552ba2163559087c3e1aa066e59f0807d
Author: Michael Natterer <mitch gimp org>
Date: Sun Apr 8 00:52:51 2012 +0200
app: remove temp_buf_copy_area()
app/base/temp-buf.c | 60 ---------------------------------------------------
app/base/temp-buf.h | 8 ------
2 files changed, 0 insertions(+), 68 deletions(-)
---
diff --git a/app/base/temp-buf.c b/app/base/temp-buf.c
index 16ffbac..1309419 100644
--- a/app/base/temp-buf.c
+++ b/app/base/temp-buf.c
@@ -30,9 +30,6 @@
#include "base-types.h"
-#include "paint-funcs/paint-funcs.h"
-
-#include "pixel-region.h"
#include "temp-buf.h"
@@ -127,63 +124,6 @@ temp_buf_scale (TempBuf *src,
return dest;
}
-TempBuf *
-temp_buf_copy_area (TempBuf *src,
- TempBuf *dest,
- gint x,
- gint y,
- gint width,
- gint height,
- gint dest_x,
- gint dest_y)
-{
- TempBuf *new;
- PixelRegion srcPR = { 0, };
- PixelRegion destPR = { 0, };
- gint x1, y1, x2, y2;
-
- g_return_val_if_fail (src != NULL, dest);
- g_return_val_if_fail (!dest || dest->bytes == src->bytes, dest);
-
- g_return_val_if_fail (width + dest_x > 0, dest);
- g_return_val_if_fail (height + dest_y > 0, dest);
-
- g_return_val_if_fail (!dest || dest->width >= width + dest_x, dest);
- g_return_val_if_fail (!dest || dest->height >= height + dest_y, dest);
-
- /* some bounds checking */
- x1 = CLAMP (x, 0, src->width - 1);
- y1 = CLAMP (y, 0, src->height - 1);
- x2 = CLAMP (x + width - 1, 0, src->width - 1);
- y2 = CLAMP (y + height - 1, 0, src->height - 1);
-
- if (!(x2 - x1) || !(y2 - y1))
- return dest;
-
- width = x2 - x1 + 1;
- height = y2 - y1 + 1;
-
- if (! dest)
- {
- new = temp_buf_new (width + dest_x,
- height + dest_y,
- src->bytes);
- temp_buf_data_clear (new);
- }
- else
- {
- new = dest;
- }
-
- /* Copy the region */
- pixel_region_init_temp_buf (&srcPR, src, x1, y1, width, height);
- pixel_region_init_temp_buf (&destPR, new, dest_x, dest_y, width, height);
-
- copy_region (&srcPR, &destPR);
-
- return new;
-}
-
/**
* temp_buf_demultiply:
* @buf:
diff --git a/app/base/temp-buf.h b/app/base/temp-buf.h
index dd43a41..041aff1 100644
--- a/app/base/temp-buf.h
+++ b/app/base/temp-buf.h
@@ -39,14 +39,6 @@ TempBuf * temp_buf_copy (TempBuf *src);
TempBuf * temp_buf_scale (TempBuf *buf,
gint width,
gint height) G_GNUC_WARN_UNUSED_RESULT;
-TempBuf * temp_buf_copy_area (TempBuf *src,
- TempBuf *dest,
- gint x,
- gint y,
- gint width,
- gint height,
- gint dest_x,
- gint dest_y);
void temp_buf_demultiply (TempBuf *buf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]