Add alpha channel to temp buffer from gimpimage if there's an alpha

2003-07-04  Dave Neary  <bolsh@gimp.org>

        * app/core/gimpdrawable-bucket-fill.c: Add alpha channel
        to temp buffer from gimpimage if there's an alpha
        channel in the pattern being applied.
This commit is contained in:
Dave Neary 2003-07-03 22:25:58 +00:00 committed by David Neary
parent a0c1420c34
commit 6bbec4dd45
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2003-07-04 Dave Neary <bolsh@gimp.org>
* app/core/gimpdrawable-bucket-fill.c: Add alpha channel
to temp buffer from gimpimage if there's an alpha
channel in the pattern being applied.
2003-07-03 Sven Neumann <sven@gimp.org>
* plug-ins/common/gif.c (save_image): refuse to write comments that

View File

@ -313,6 +313,17 @@ gimp_drawable_bucket_fill_full (GimpDrawable *drawable,
has_alpha = TRUE;
}
}
else if (pat_buf->bytes == 2 || pat_buf->bytes == 4)
{
/* If pattern being applied has an alpha channel,
* add one to the temp buffer from the image too.
*/
if (! has_alpha)
{
bytes ++;
has_alpha = TRUE;
}
}
buf_tiles = tile_manager_new ((x2 - x1), (y2 - y1), bytes);
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), TRUE);