mirror of https://github.com/GNOME/gimp.git
Only consider layers with combine mode Normal when testing if any layer
2007-06-22 Martin Nordholts <martinn@svn.gnome.org> * app/core/gimpprojection-construct.c (gimp_projection_initialize): Only consider layers with combine mode Normal when testing if any layer covers the entire specified area. Fixes bug #440154. svn path=/trunk/; revision=22824
This commit is contained in:
parent
e74f8a034c
commit
a42d1b45ed
|
@ -1,3 +1,9 @@
|
|||
2007-06-22 Martin Nordholts <martinn@svn.gnome.org>
|
||||
|
||||
* app/core/gimpprojection-construct.c (gimp_projection_initialize): Only
|
||||
consider layers with combine mode Normal when testing if any layer
|
||||
covers the entire specified area. Fixes bug #440154.
|
||||
|
||||
2007-06-22 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/gimp.c (gimp_restore): note that loading fonts may take
|
||||
|
|
|
@ -323,6 +323,18 @@ gimp_projection_construct_channels (GimpProjection *proj,
|
|||
g_list_free (reverse_list);
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_projection_initialize:
|
||||
* @proj: A #GimpProjection.
|
||||
* @x:
|
||||
* @y:
|
||||
* @w:
|
||||
* @h:
|
||||
*
|
||||
* This function determines whether a visible layer with combine mode Normal
|
||||
* provides complete coverage over the specified area. If not, the projection
|
||||
* is initialized to transparent black.
|
||||
*/
|
||||
static void
|
||||
gimp_projection_initialize (GimpProjection *proj,
|
||||
gint x,
|
||||
|
@ -334,11 +346,6 @@ gimp_projection_initialize (GimpProjection *proj,
|
|||
GList *list;
|
||||
gboolean coverage = FALSE;
|
||||
|
||||
/* this function determines whether a visible layer
|
||||
* provides complete coverage over the image. If not,
|
||||
* the projection is initialized to transparent
|
||||
*/
|
||||
|
||||
for (list = GIMP_LIST (proj->image->layers)->list;
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
|
@ -348,11 +355,12 @@ gimp_projection_initialize (GimpProjection *proj,
|
|||
|
||||
gimp_item_offsets (item, &off_x, &off_y);
|
||||
|
||||
if (gimp_item_get_visible (item) &&
|
||||
! gimp_drawable_has_alpha (GIMP_DRAWABLE (item)) &&
|
||||
(off_x <= x) &&
|
||||
(off_y <= y) &&
|
||||
(off_x + gimp_item_width (item) >= x + w) &&
|
||||
if (gimp_item_get_visible (item) &&
|
||||
! gimp_drawable_has_alpha (GIMP_DRAWABLE (item)) &&
|
||||
gimp_layer_get_mode (GIMP_LAYER (item)) == GIMP_NORMAL_MODE &&
|
||||
(off_x <= x) &&
|
||||
(off_y <= y) &&
|
||||
(off_x + gimp_item_width (item) >= x + w) &&
|
||||
(off_y + gimp_item_height (item) >= y + h))
|
||||
{
|
||||
coverage = TRUE;
|
||||
|
|
Loading…
Reference in New Issue