Use the new _clear function and more cleanups.
2001-01-02 Daniel Egger <egger@suse.de> * app/clone.c: * app/gimpimage.c: * app/temp_buf.c: Use the new _clear function and more cleanups.
This commit is contained in:
committed by
Daniel Egger
parent
e7a9439e5f
commit
b4630d410e
@ -1,3 +1,9 @@
|
||||
2001-01-02 Daniel Egger <egger@suse.de>
|
||||
|
||||
* app/clone.c:
|
||||
* app/gimpimage.c:
|
||||
* app/temp_buf.c: Use the new _clear function and more cleanups.
|
||||
|
||||
2001-01-02 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/temp_buf.[ch]: temp_buf_data_clear(): the temp_buf's size is
|
||||
|
||||
@ -395,18 +395,12 @@ mask_buf_free (MaskBuf *mask)
|
||||
guchar *
|
||||
mask_buf_data (MaskBuf *mask_buf)
|
||||
{
|
||||
if (mask_buf->swapped)
|
||||
temp_buf_unswap ((TempBuf *) mask_buf);
|
||||
|
||||
return mask_buf->data;
|
||||
return temp_buf_data_clear;
|
||||
}
|
||||
|
||||
guchar *
|
||||
mask_buf_data_clear (MaskBuf *mask_buf)
|
||||
{
|
||||
if (mask_buf->swapped)
|
||||
temp_buf_unswap ((TempBuf *) mask_buf);
|
||||
|
||||
return temp_buf_data_clear ((TempBuf *) mask_buf);
|
||||
}
|
||||
|
||||
|
||||
@ -494,7 +494,7 @@ clone_motion (PaintCore *paint_core,
|
||||
{
|
||||
case IMAGE_CLONE:
|
||||
/* Set the paint area to transparent */
|
||||
memset (temp_buf_data (area), 0, area->width * area->height * area->bytes);
|
||||
temp_buf_data_clear (area);
|
||||
|
||||
/* If the source gimage is different from the destination,
|
||||
* then we should copy straight from the destination image
|
||||
|
||||
@ -3819,7 +3819,7 @@ gimp_image_construct_composite_preview (GimpImage *gimage,
|
||||
|
||||
/* The construction buffer */
|
||||
comp = temp_buf_new (width, height, bytes, 0, 0, NULL);
|
||||
memset (temp_buf_data (comp), 0, comp->width * comp->height * comp->bytes);
|
||||
temp_buf_data_clear (comp);
|
||||
|
||||
floating_sel = NULL;
|
||||
for (list = gimage->layers; list; list = g_slist_next (list))
|
||||
|
||||
@ -3819,7 +3819,7 @@ gimp_image_construct_composite_preview (GimpImage *gimage,
|
||||
|
||||
/* The construction buffer */
|
||||
comp = temp_buf_new (width, height, bytes, 0, 0, NULL);
|
||||
memset (temp_buf_data (comp), 0, comp->width * comp->height * comp->bytes);
|
||||
temp_buf_data_clear (comp);
|
||||
|
||||
floating_sel = NULL;
|
||||
for (list = gimage->layers; list; list = g_slist_next (list))
|
||||
|
||||
@ -3819,7 +3819,7 @@ gimp_image_construct_composite_preview (GimpImage *gimage,
|
||||
|
||||
/* The construction buffer */
|
||||
comp = temp_buf_new (width, height, bytes, 0, 0, NULL);
|
||||
memset (temp_buf_data (comp), 0, comp->width * comp->height * comp->bytes);
|
||||
temp_buf_data_clear (comp);
|
||||
|
||||
floating_sel = NULL;
|
||||
for (list = gimage->layers; list; list = g_slist_next (list))
|
||||
|
||||
@ -3819,7 +3819,7 @@ gimp_image_construct_composite_preview (GimpImage *gimage,
|
||||
|
||||
/* The construction buffer */
|
||||
comp = temp_buf_new (width, height, bytes, 0, 0, NULL);
|
||||
memset (temp_buf_data (comp), 0, comp->width * comp->height * comp->bytes);
|
||||
temp_buf_data_clear (comp);
|
||||
|
||||
floating_sel = NULL;
|
||||
for (list = gimage->layers; list; list = g_slist_next (list))
|
||||
|
||||
@ -3819,7 +3819,7 @@ gimp_image_construct_composite_preview (GimpImage *gimage,
|
||||
|
||||
/* The construction buffer */
|
||||
comp = temp_buf_new (width, height, bytes, 0, 0, NULL);
|
||||
memset (temp_buf_data (comp), 0, comp->width * comp->height * comp->bytes);
|
||||
temp_buf_data_clear (comp);
|
||||
|
||||
floating_sel = NULL;
|
||||
for (list = gimage->layers; list; list = g_slist_next (list))
|
||||
|
||||
@ -3819,7 +3819,7 @@ gimp_image_construct_composite_preview (GimpImage *gimage,
|
||||
|
||||
/* The construction buffer */
|
||||
comp = temp_buf_new (width, height, bytes, 0, 0, NULL);
|
||||
memset (temp_buf_data (comp), 0, comp->width * comp->height * comp->bytes);
|
||||
temp_buf_data_clear (comp);
|
||||
|
||||
floating_sel = NULL;
|
||||
for (list = gimage->layers; list; list = g_slist_next (list))
|
||||
|
||||
@ -3819,7 +3819,7 @@ gimp_image_construct_composite_preview (GimpImage *gimage,
|
||||
|
||||
/* The construction buffer */
|
||||
comp = temp_buf_new (width, height, bytes, 0, 0, NULL);
|
||||
memset (temp_buf_data (comp), 0, comp->width * comp->height * comp->bytes);
|
||||
temp_buf_data_clear (comp);
|
||||
|
||||
floating_sel = NULL;
|
||||
for (list = gimage->layers; list; list = g_slist_next (list))
|
||||
|
||||
@ -3819,7 +3819,7 @@ gimp_image_construct_composite_preview (GimpImage *gimage,
|
||||
|
||||
/* The construction buffer */
|
||||
comp = temp_buf_new (width, height, bytes, 0, 0, NULL);
|
||||
memset (temp_buf_data (comp), 0, comp->width * comp->height * comp->bytes);
|
||||
temp_buf_data_clear (comp);
|
||||
|
||||
floating_sel = NULL;
|
||||
for (list = gimage->layers; list; list = g_slist_next (list))
|
||||
|
||||
@ -494,7 +494,7 @@ clone_motion (PaintCore *paint_core,
|
||||
{
|
||||
case IMAGE_CLONE:
|
||||
/* Set the paint area to transparent */
|
||||
memset (temp_buf_data (area), 0, area->width * area->height * area->bytes);
|
||||
temp_buf_data_clear (area);
|
||||
|
||||
/* If the source gimage is different from the destination,
|
||||
* then we should copy straight from the destination image
|
||||
|
||||
@ -494,7 +494,7 @@ clone_motion (PaintCore *paint_core,
|
||||
{
|
||||
case IMAGE_CLONE:
|
||||
/* Set the paint area to transparent */
|
||||
memset (temp_buf_data (area), 0, area->width * area->height * area->bytes);
|
||||
temp_buf_data_clear (area);
|
||||
|
||||
/* If the source gimage is different from the destination,
|
||||
* then we should copy straight from the destination image
|
||||
|
||||
@ -395,18 +395,12 @@ mask_buf_free (MaskBuf *mask)
|
||||
guchar *
|
||||
mask_buf_data (MaskBuf *mask_buf)
|
||||
{
|
||||
if (mask_buf->swapped)
|
||||
temp_buf_unswap ((TempBuf *) mask_buf);
|
||||
|
||||
return mask_buf->data;
|
||||
return temp_buf_data_clear;
|
||||
}
|
||||
|
||||
guchar *
|
||||
mask_buf_data_clear (MaskBuf *mask_buf)
|
||||
{
|
||||
if (mask_buf->swapped)
|
||||
temp_buf_unswap ((TempBuf *) mask_buf);
|
||||
|
||||
return temp_buf_data_clear ((TempBuf *) mask_buf);
|
||||
}
|
||||
|
||||
|
||||
@ -494,7 +494,7 @@ clone_motion (PaintCore *paint_core,
|
||||
{
|
||||
case IMAGE_CLONE:
|
||||
/* Set the paint area to transparent */
|
||||
memset (temp_buf_data (area), 0, area->width * area->height * area->bytes);
|
||||
temp_buf_data_clear (area);
|
||||
|
||||
/* If the source gimage is different from the destination,
|
||||
* then we should copy straight from the destination image
|
||||
|
||||
@ -494,7 +494,7 @@ clone_motion (PaintCore *paint_core,
|
||||
{
|
||||
case IMAGE_CLONE:
|
||||
/* Set the paint area to transparent */
|
||||
memset (temp_buf_data (area), 0, area->width * area->height * area->bytes);
|
||||
temp_buf_data_clear (area);
|
||||
|
||||
/* If the source gimage is different from the destination,
|
||||
* then we should copy straight from the destination image
|
||||
|
||||
@ -494,7 +494,7 @@ clone_motion (PaintCore *paint_core,
|
||||
{
|
||||
case IMAGE_CLONE:
|
||||
/* Set the paint area to transparent */
|
||||
memset (temp_buf_data (area), 0, area->width * area->height * area->bytes);
|
||||
temp_buf_data_clear (area);
|
||||
|
||||
/* If the source gimage is different from the destination,
|
||||
* then we should copy straight from the destination image
|
||||
|
||||
Reference in New Issue
Block a user