mirror of https://github.com/GNOME/gimp.git
Fixed a preserve-transparency bug w/blend tool and possibly elsewhere.
Sun May 23 02:35:57 BST 1999 Adam D. Moss <adam@gimp.org> * app/paint_funcs.c: Fixed a preserve-transparency bug w/blend tool and possibly elsewhere. Allowed the opacity-quickskip rule to be applied more generously. Be a bit lazier with row-hint re-evalution (tnx j).
This commit is contained in:
parent
dcfb450b25
commit
d15f16deb4
|
@ -1,3 +1,11 @@
|
|||
Sun May 23 02:35:57 BST 1999 Adam D. Moss <adam@gimp.org>
|
||||
|
||||
* app/paint_funcs.c: Fixed a preserve-transparency
|
||||
bug w/blend tool and possibly elsewhere. Allowed
|
||||
the opacity-quickskip rule to be applied more generously.
|
||||
|
||||
Be a bit lazier with row-hint re-evalution (tnx j).
|
||||
|
||||
1999-05-22 Michael Natterer <mitschel@cs.tu-berlin.de>
|
||||
|
||||
* app/[all files with resolution info]
|
||||
|
|
|
@ -5148,14 +5148,19 @@ combine_sub_region(struct combine_regions_struct *st,
|
|||
|
||||
|
||||
/* cheap and easy when the row of src2 is completely opaque/transparent */
|
||||
opacity_quickskip_possible = ((!m) && (opacity==255));
|
||||
transparency_quickskip_possible = ((src2->tiles) && (mode != REPLACE_MODE));
|
||||
opacity_quickskip_possible = ((!m) && (opacity==255) &&
|
||||
(mode_affect &&
|
||||
has_alpha1 &&
|
||||
affect[src1->bytes-1]));
|
||||
transparency_quickskip_possible = ((src2->tiles) &&
|
||||
(mode != REPLACE_MODE));
|
||||
|
||||
|
||||
if (src1->w > 128)
|
||||
g_error("combine_sub_region::src1->w = %d\n", src1->w);
|
||||
|
||||
if (src2->tiles)
|
||||
if ((transparency_quickskip_possible || opacity_quickskip_possible) &&
|
||||
src2->tiles)
|
||||
{
|
||||
#ifdef HINTS_SANITY
|
||||
if (src1->h != src2->h)
|
||||
|
@ -5172,13 +5177,23 @@ combine_sub_region(struct combine_regions_struct *st,
|
|||
{
|
||||
hint = TILEROWHINT_UNDEFINED;
|
||||
|
||||
if (transparency_quickskip_possible &&
|
||||
((hint = tile_get_rowhint (src2->curtile, (src2->offy + h))) ==
|
||||
TILEROWHINT_TRANSPARENT))
|
||||
if (transparency_quickskip_possible)
|
||||
{
|
||||
goto next_row;
|
||||
hint = tile_get_rowhint (src2->curtile, (src2->offy + h));
|
||||
|
||||
if (hint == TILEROWHINT_TRANSPARENT)
|
||||
{
|
||||
goto next_row;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (opacity_quickskip_possible)
|
||||
{
|
||||
hint = tile_get_rowhint (src2->curtile, (src2->offy + h));
|
||||
}
|
||||
}
|
||||
|
||||
s = buf;
|
||||
|
||||
/* apply the paint mode based on the combination type & mode */
|
||||
|
@ -5211,7 +5226,6 @@ combine_sub_region(struct combine_regions_struct *st,
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
/* based on the type of the initial image... */
|
||||
switch (combine)
|
||||
{
|
||||
|
|
|
@ -5148,14 +5148,19 @@ combine_sub_region(struct combine_regions_struct *st,
|
|||
|
||||
|
||||
/* cheap and easy when the row of src2 is completely opaque/transparent */
|
||||
opacity_quickskip_possible = ((!m) && (opacity==255));
|
||||
transparency_quickskip_possible = ((src2->tiles) && (mode != REPLACE_MODE));
|
||||
opacity_quickskip_possible = ((!m) && (opacity==255) &&
|
||||
(mode_affect &&
|
||||
has_alpha1 &&
|
||||
affect[src1->bytes-1]));
|
||||
transparency_quickskip_possible = ((src2->tiles) &&
|
||||
(mode != REPLACE_MODE));
|
||||
|
||||
|
||||
if (src1->w > 128)
|
||||
g_error("combine_sub_region::src1->w = %d\n", src1->w);
|
||||
|
||||
if (src2->tiles)
|
||||
if ((transparency_quickskip_possible || opacity_quickskip_possible) &&
|
||||
src2->tiles)
|
||||
{
|
||||
#ifdef HINTS_SANITY
|
||||
if (src1->h != src2->h)
|
||||
|
@ -5172,13 +5177,23 @@ combine_sub_region(struct combine_regions_struct *st,
|
|||
{
|
||||
hint = TILEROWHINT_UNDEFINED;
|
||||
|
||||
if (transparency_quickskip_possible &&
|
||||
((hint = tile_get_rowhint (src2->curtile, (src2->offy + h))) ==
|
||||
TILEROWHINT_TRANSPARENT))
|
||||
if (transparency_quickskip_possible)
|
||||
{
|
||||
goto next_row;
|
||||
hint = tile_get_rowhint (src2->curtile, (src2->offy + h));
|
||||
|
||||
if (hint == TILEROWHINT_TRANSPARENT)
|
||||
{
|
||||
goto next_row;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (opacity_quickskip_possible)
|
||||
{
|
||||
hint = tile_get_rowhint (src2->curtile, (src2->offy + h));
|
||||
}
|
||||
}
|
||||
|
||||
s = buf;
|
||||
|
||||
/* apply the paint mode based on the combination type & mode */
|
||||
|
@ -5211,7 +5226,6 @@ combine_sub_region(struct combine_regions_struct *st,
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
/* based on the type of the initial image... */
|
||||
switch (combine)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue