Commit e8378499 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

removed the _value() and _is_empty() wrappers.

2003-09-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-mask.[ch]: removed the _value() and
	_is_empty() wrappers.

	* app/display/gimpdisplayshell.[ch]: removed
	gimp_display_shell_mask_value() since it is not used.

	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpedit.c
	* app/core/gimpimage.c
	* app/core/gimplayer.c
	* app/gui/image-menu.c
	* app/gui/vectors-menu.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptransformtool.c
	* tools/pdbgen/pdb/misc_tools.pdb: changed accordingly.

	* app/pdb/misc_tools_cmds.c: regenerated.
parent 1c04c3f6
2003-09-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask.[ch]: removed the _value() and
_is_empty() wrappers.
* app/display/gimpdisplayshell.[ch]: removed
gimp_display_shell_mask_value() since it is not used.
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-transform.c
* app/core/gimpedit.c
* app/core/gimpimage.c
* app/core/gimplayer.c
* app/gui/image-menu.c
* app/gui/vectors-menu.c
* app/tools/gimpclonetool.c
* app/tools/gimpfliptool.c
* app/tools/gimpinktool.c
* app/tools/gimpmovetool.c
* app/tools/gimpselectiontool.c
* app/tools/gimptransformtool.c
* tools/pdbgen/pdb/misc_tools.pdb: changed accordingly.
* app/pdb/misc_tools_cmds.c: regenerated.
2003-09-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask-select.[ch]: removed the _clear() wrapper.
......@@ -61,7 +61,7 @@ gimp_edit_cut (GimpImage *gimage,
_("Cut"));
/* See if the gimage mask is empty */
empty = gimp_image_mask_is_empty (gimage);
empty = gimp_channel_is_empty (gimp_image_get_mask (gimage));
/* Next, cut the mask portion from the gimage */
cut = gimp_image_mask_extract (gimage, drawable, TRUE, FALSE, TRUE);
......@@ -119,7 +119,7 @@ gimp_edit_copy (GimpImage *gimage,
_("Copy"));
/* See if the gimage mask is empty */
empty = gimp_image_mask_is_empty (gimage);
empty = gimp_channel_is_empty (gimp_image_get_mask (gimage));
/* First, copy the masked portion of the gimage */
copy = gimp_image_mask_extract (gimage, drawable, FALSE, FALSE, TRUE);
......@@ -219,7 +219,7 @@ gimp_edit_paste (GimpImage *gimage,
* this might not always be desired, but in general,
* it seems like the correct behavior.
*/
if (! gimp_image_mask_is_empty (gimage) && ! paste_into)
if (! gimp_channel_is_empty (gimp_image_get_mask (gimage)) && ! paste_into)
gimp_channel_clear (gimp_image_get_mask (gimage), NULL, TRUE);
/* if there's a drawable, add a new floating selection */
......
......@@ -1001,7 +1001,7 @@ gimp_drawable_transform_cut (GimpDrawable *drawable,
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
/* extract the selected mask if there is a selection */
if (! gimp_image_mask_is_empty (gimage))
if (! gimp_channel_is_empty (gimp_image_get_mask (gimage)))
{
/* set the keep_indexed flag to FALSE here, since we use
* gimp_layer_new_from_tiles() later which assumes that the tiles
......
......@@ -34,12 +34,11 @@
#include "paint-funcs/paint-funcs.h"
#include "gimp.h"
#include "gimpchannel.h"
#include "gimpcontext.h"
#include "gimpdrawable.h"
#include "gimpdrawable-blend.h"
#include "gimpgradient.h"
#include "gimpimage.h"
#include "gimpimage-mask.h"
#include "gimp-intl.h"
......@@ -621,8 +620,10 @@ gradient_precalc_shapeburst (GimpImage *gimage,
tempR.tiles = tile_manager_new (PR->w, PR->h, 1);
pixel_region_init (&tempR, tempR.tiles, 0, 0, PR->w, PR->h, TRUE);
mask = gimp_image_get_mask (gimage);
/* If the gimage mask is not empty, use it as the shape burst source */
if (! gimp_image_mask_is_empty (gimage))
if (! gimp_channel_is_empty (mask))
{
PixelRegion maskR;
gint x1, y1, x2, y2;
......@@ -631,8 +632,6 @@ gradient_precalc_shapeburst (GimpImage *gimage,
gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
gimp_item_offsets (GIMP_ITEM (drawable), &offx, &offy);
/* the selection mask */
mask = gimp_image_get_mask (gimage);
pixel_region_init (&maskR, gimp_drawable_data (GIMP_DRAWABLE (mask)),
x1 + offx, y1 + offy, (x2 - x1), (y2 - y1), FALSE);
......
......@@ -1001,7 +1001,7 @@ gimp_drawable_transform_cut (GimpDrawable *drawable,
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
/* extract the selected mask if there is a selection */
if (! gimp_image_mask_is_empty (gimage))
if (! gimp_channel_is_empty (gimp_image_get_mask (gimage)))
{
/* set the keep_indexed flag to FALSE here, since we use
* gimp_layer_new_from_tiles() later which assumes that the tiles
......
......@@ -61,7 +61,7 @@ gimp_edit_cut (GimpImage *gimage,
_("Cut"));
/* See if the gimage mask is empty */
empty = gimp_image_mask_is_empty (gimage);
empty = gimp_channel_is_empty (gimp_image_get_mask (gimage));
/* Next, cut the mask portion from the gimage */
cut = gimp_image_mask_extract (gimage, drawable, TRUE, FALSE, TRUE);
......@@ -119,7 +119,7 @@ gimp_edit_copy (GimpImage *gimage,
_("Copy"));
/* See if the gimage mask is empty */
empty = gimp_image_mask_is_empty (gimage);
empty = gimp_channel_is_empty (gimp_image_get_mask (gimage));
/* First, copy the masked portion of the gimage */
copy = gimp_image_mask_extract (gimage, drawable, FALSE, FALSE, TRUE);
......@@ -219,7 +219,7 @@ gimp_edit_paste (GimpImage *gimage,
* this might not always be desired, but in general,
* it seems like the correct behavior.
*/
if (! gimp_image_mask_is_empty (gimage) && ! paste_into)
if (! gimp_channel_is_empty (gimp_image_get_mask (gimage)) && ! paste_into)
gimp_channel_clear (gimp_image_get_mask (gimage), NULL, TRUE);
/* if there's a drawable, add a new floating selection */
......
......@@ -73,24 +73,6 @@ gimp_image_mask_bounds (GimpImage *gimage,
return gimp_channel_bounds (gimp_image_get_mask (gimage), x1, y1, x2, y2);
}
gint
gimp_image_mask_value (GimpImage *gimage,
gint x,
gint y)
{
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), 0);
return gimp_channel_value (gimp_image_get_mask (gimage), x, y);
}
gboolean
gimp_image_mask_is_empty (GimpImage *gimage)
{
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
return gimp_channel_is_empty (gimp_image_get_mask (gimage));
}
void
gimp_image_mask_push_undo (GimpImage *gimage,
const gchar *undo_desc)
......
......@@ -32,10 +32,6 @@ gboolean gimp_image_mask_bounds (GimpImage *gimage,
gint *y1,
gint *x2,
gint *y2);
gint gimp_image_mask_value (GimpImage *gimage,
gint x,
gint y);
gboolean gimp_image_mask_is_empty (GimpImage *gimage);
/* pure wrappers around the resp. GimpSelection functions: */
......
......@@ -1687,8 +1687,9 @@ gimp_image_apply_image (GimpImage *gimage,
item = GIMP_ITEM (drawable);
/* get the selection mask if one exists */
mask = (gimp_image_mask_is_empty (gimage) ?
NULL : gimp_image_get_mask (gimage));
mask = gimp_image_get_mask (gimage);
if (gimp_channel_is_empty (mask))
mask = NULL;
/* configure the active channel array */
gimp_image_get_active_components (gimage, drawable, active_components);
......@@ -1810,7 +1811,9 @@ gimp_image_replace_image (GimpImage *gimage,
item = GIMP_ITEM (drawable);
/* get the selection mask if one exists */
mask = (gimp_image_mask_is_empty (gimage)) ? NULL : gimp_image_get_mask (gimage);
mask = gimp_image_get_mask (gimage);
if (gimp_channel_is_empty (mask))
mask = NULL;
/* configure the active channel array */
gimp_image_get_active_components (gimage, drawable, active_components);
......
......@@ -964,7 +964,7 @@ gimp_layer_create_mask (const GimpLayer *layer,
gint copy_width, copy_height;
selection = gimp_image_get_mask (gimage);
selection_empty = gimp_image_mask_is_empty (gimage);
selection_empty = gimp_channel_is_empty (selection);
gimp_rectangle_intersect (0, 0, gimage->width, gimage->height,
item->offset_x, item->offset_y,
......
......@@ -38,7 +38,6 @@
#include "core/gimpcontext.h"
#include "core/gimpgrid.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimpimage-snap.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
......@@ -1050,19 +1049,6 @@ gimp_display_shell_snap_coords (GimpDisplayShell *shell,
}
}
gint
gimp_display_shell_mask_value (GimpDisplayShell *shell,
gint x,
gint y)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), 0);
/* move the coordinates from screen space to image space */
gimp_display_shell_untransform_xy (shell, x, y, &x, &y, FALSE, FALSE);
return gimp_image_mask_value (shell->gdisp->gimage, x, y);
}
gboolean
gimp_display_shell_mask_bounds (GimpDisplayShell *shell,
gint *x1,
......
......@@ -205,9 +205,6 @@ void gimp_display_shell_snap_coords (GimpDisplayShell *shell,
gint snap_width,
gint snap_height);
gint gimp_display_shell_mask_value (GimpDisplayShell *shell,
gint x,
gint y);
gboolean gimp_display_shell_mask_bounds (GimpDisplayShell *shell,
gint *x1,
gint *y1,
......
......@@ -38,7 +38,6 @@
#include "core/gimpcontext.h"
#include "core/gimpgrid.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimpimage-snap.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
......@@ -1050,19 +1049,6 @@ gimp_display_shell_snap_coords (GimpDisplayShell *shell,
}
}
gint
gimp_display_shell_mask_value (GimpDisplayShell *shell,
gint x,
gint y)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), 0);
/* move the coordinates from screen space to image space */
gimp_display_shell_untransform_xy (shell, x, y, &x, &y, FALSE, FALSE);
return gimp_image_mask_value (shell->gdisp->gimage, x, y);
}
gboolean
gimp_display_shell_mask_bounds (GimpDisplayShell *shell,
gint *x1,
......
......@@ -205,9 +205,6 @@ void gimp_display_shell_snap_coords (GimpDisplayShell *shell,
gint snap_width,
gint snap_height);
gint gimp_display_shell_mask_value (GimpDisplayShell *shell,
gint x,
gint y);
gboolean gimp_display_shell_mask_bounds (GimpDisplayShell *shell,
gint *x1,
gint *y1,
......
......@@ -27,6 +27,7 @@
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpchannel.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
......@@ -1341,7 +1342,7 @@ image_menu_update (GtkItemFactory *item_factory,
fs = (gimp_image_floating_sel (gimage) != NULL);
aux = (gimp_image_get_active_channel (gimage) != NULL);
lp = ! gimp_image_is_empty (gimage);
sel = ! gimp_image_mask_is_empty (gimage);
sel = ! gimp_channel_is_empty (gimp_image_get_mask (gimage));
drawable = gimp_image_active_drawable (gimage);
if (drawable)
......
......@@ -24,8 +24,8 @@
#include "gui-types.h"
#include "core/gimpchannel.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimplist.h"
#include "widgets/gimphelp-ids.h"
......@@ -161,7 +161,7 @@ vectors_menu_update (GtkItemFactory *factory,
vectors = gimp_image_get_active_vectors (gimage);
mask_empty = gimp_image_mask_is_empty (gimage);
mask_empty = gimp_channel_is_empty (gimp_image_get_mask (gimage));
global_buf = FALSE;
......
......@@ -27,6 +27,7 @@
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpchannel.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
......@@ -1341,7 +1342,7 @@ image_menu_update (GtkItemFactory *item_factory,
fs = (gimp_image_floating_sel (gimage) != NULL);
aux = (gimp_image_get_active_channel (gimage) != NULL);
lp = ! gimp_image_is_empty (gimage);
sel = ! gimp_image_mask_is_empty (gimage);
sel = ! gimp_channel_is_empty (gimp_image_get_mask (gimage));
drawable = gimp_image_active_drawable (gimage);
if (drawable)
......
......@@ -35,9 +35,8 @@
#include "paint-funcs/paint-funcs.h"
#include "core/gimp.h"
#include "core/gimpdrawable.h"
#include "core/gimpchannel.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimpimage-undo-push.h"
#include "core/gimptoolinfo.h"
......@@ -465,12 +464,14 @@ gimp_ink_tool_cursor_update (GimpTool *tool,
if (gimp_display_coords_in_active_drawable (gdisp, coords))
{
GimpChannel *selection = gimp_image_get_mask (gdisp->gimage);
/* One more test--is there a selected region?
* if so, is cursor inside?
*/
if (gimp_image_mask_is_empty (gdisp->gimage))
if (gimp_channel_is_empty (selection))
ctype = GIMP_MOUSE_CURSOR;
else if (gimp_image_mask_value (gdisp->gimage, coords->x, coords->y))
else if (gimp_channel_value (selection, coords->x, coords->y))
ctype = GIMP_MOUSE_CURSOR;
}
......
......@@ -28,10 +28,10 @@
#include "pdb-types.h"
#include "procedural_db.h"
#include "core/gimpchannel.h"
#include "core/gimpdrawable-blend.h"
#include "core/gimpdrawable-bucket-fill.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage-mask.h"
#include "core/gimpimage-pick-color.h"
#include "core/gimpimage.h"
......@@ -288,7 +288,9 @@ bucket_fill_invoker (Gimp *gimp,
if (success)
{
if (! gimp_item_get_image (GIMP_ITEM (drawable)))
GimpImage *gimage = gimp_item_get_image (GIMP_ITEM (drawable));
if (! gimage)
{
success = FALSE;
}
......@@ -296,7 +298,7 @@ bucket_fill_invoker (Gimp *gimp,
{
gboolean do_seed_fill;
do_seed_fill = gimp_image_mask_is_empty (gimp_item_get_image (GIMP_ITEM (drawable)));
do_seed_fill = gimp_channel_is_empty (gimp_image_get_mask (gimage));
gimp_drawable_bucket_fill (drawable, fill_mode,
paint_mode, opacity / 100.0,
......
......@@ -24,9 +24,8 @@
#include "tools-types.h"
#include "core/gimpdrawable.h"
#include "core/gimpchannel.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimptoolinfo.h"
#include "paint/gimpclone.h"
......@@ -247,12 +246,14 @@ gimp_clone_tool_cursor_update (GimpTool *tool,
if (gimp_display_coords_in_active_drawable (gdisp, coords))
{
GimpChannel *selection = gimp_image_get_mask (gdisp->gimage);
/* One more test--is there a selected region?
* if so, is cursor inside?
*/
if (gimp_image_mask_is_empty (gdisp->gimage))
if (gimp_channel_is_empty (selection))
ctype = GIMP_MOUSE_CURSOR;
else if (gimp_image_mask_value (gdisp->gimage, coords->x, coords->y))
else if (gimp_channel_value (selection, coords->x, coords->y))
ctype = GIMP_MOUSE_CURSOR;
}
......
......@@ -29,10 +29,9 @@
#include "base/tile-manager.h"
#include "core/gimpdrawable.h"
#include "core/gimpchannel.h"
#include "core/gimpdrawable-transform.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimpitem-linked.h"
#include "core/gimptoolinfo.h"
......@@ -206,9 +205,11 @@ gimp_flip_tool_cursor_update (GimpTool *tool,
if (gimp_display_coords_in_active_drawable (gdisp, coords))
{
GimpChannel *selection = gimp_image_get_mask (gdisp->gimage);
/* Is there a selected region? If so, is cursor inside? */
if (gimp_image_mask_is_empty (gdisp->gimage) ||
gimp_image_mask_value (gdisp->gimage, coords->x, coords->y))
if (gimp_channel_is_empty (selection) ||
gimp_channel_value (selection, coords->x, coords->y))
{
bad_cursor = FALSE;
}
......
......@@ -35,9 +35,8 @@
#include "paint-funcs/paint-funcs.h"
#include "core/gimp.h"
#include "core/gimpdrawable.h"
#include "core/gimpchannel.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimpimage-undo-push.h"
#include "core/gimptoolinfo.h"
......@@ -465,12 +464,14 @@ gimp_ink_tool_cursor_update (GimpTool *tool,
if (gimp_display_coords_in_active_drawable (gdisp, coords))
{
GimpChannel *selection = gimp_image_get_mask (gdisp->gimage);
/* One more test--is there a selected region?
* if so, is cursor inside?
*/
if (gimp_image_mask_is_empty (gdisp->gimage))
if (gimp_channel_is_empty (selection))
ctype = GIMP_MOUSE_CURSOR;
else if (gimp_image_mask_value (gdisp->gimage, coords->x, coords->y))
else if (gimp_channel_value (selection, coords->x, coords->y))
ctype = GIMP_MOUSE_CURSOR;
}
......
......@@ -26,9 +26,9 @@
#include "tools-types.h"
#include "core/gimpchannel.h"
#include "core/gimpimage.h"
#include "core/gimpimage-guides.h"
#include "core/gimpimage-mask.h"
#include "core/gimplayer.h"
#include "core/gimplayer-floating-sel.h"
#include "core/gimptoolinfo.h"
......@@ -240,7 +240,8 @@ gimp_move_tool_button_press (GimpTool *tool,
move->guide_disp = NULL;
move->moving_guide = FALSE;
if (options->move_mask && ! gimp_image_mask_is_empty (gdisp->gimage))
if (options->move_mask &&
! gimp_channel_is_empty (gimp_image_get_mask (gdisp->gimage)))
{
init_edit_selection (tool, gdisp, coords, EDIT_MASK_TRANSLATE);
gimp_tool_control_activate (tool->control);
......@@ -515,7 +516,8 @@ gimp_move_tool_cursor_update (GimpTool *tool,
move = GIMP_MOVE_TOOL (tool);
options = GIMP_MOVE_OPTIONS (tool->tool_info->tool_options);
if (options->move_mask && ! gimp_image_mask_is_empty (gdisp->gimage))
if (options->move_mask &&
! gimp_channel_is_empty (gimp_image_get_mask (gdisp->gimage)))
{
gimp_tool_set_cursor (tool, gdisp,
GIMP_MOUSE_CURSOR,
......
......@@ -25,8 +25,8 @@
#include "tools-types.h"
#include "core/gimpchannel.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimptoolinfo.h"
#include "display/gimpdisplay.h"
......@@ -177,6 +177,7 @@ gimp_selection_tool_oper_update (GimpTool *tool,
{
GimpSelectionTool *selection_tool;
GimpSelectionOptions *options;
GimpChannel *selection;
GimpLayer *layer;
GimpLayer *floating_sel;
gboolean move_layer = FALSE;
......@@ -185,7 +186,9 @@ gimp_selection_tool_oper_update (GimpTool *tool,
selection_tool = GIMP_SELECTION_TOOL (tool);
options = GIMP_SELECTION_OPTIONS (tool->tool_info->tool_options);
layer = gimp_image_pick_correlate_layer (gdisp->gimage, coords->x, coords->y);
selection = gimp_image_get_mask (gdisp->gimage);
layer = gimp_image_pick_correlate_layer (gdisp->gimage,
coords->x, coords->y);
floating_sel = gimp_image_floating_sel (gdisp->gimage);
if (layer)
......@@ -195,7 +198,7 @@ gimp_selection_tool_oper_update (GimpTool *tool,
if (layer == floating_sel)
move_floating_sel = TRUE;
}
else if (gimp_image_mask_value (gdisp->gimage, coords->x, coords->y))
else if (gimp_channel_value (selection, coords->x, coords->y))
{
move_layer = TRUE;
}
......@@ -205,7 +208,7 @@ gimp_selection_tool_oper_update (GimpTool *tool,
{
selection_tool->op = SELECTION_MOVE_COPY; /* move a copy of the selection */
}
else if ((state & GDK_MOD1_MASK) && ! gimp_image_mask_is_empty (gdisp->gimage))
else if ((state & GDK_MOD1_MASK) && ! gimp_channel_is_empty (selection))
{
selection_tool->op = SELECTION_MOVE_MASK; /* move the selection mask */
}
......
......@@ -24,9 +24,8 @@
#include "tools-types.h"
#include "core/gimpdrawable.h"
#include "core/gimpchannel.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimptoolinfo.h"
#include "paint/gimpclone.h"
......@@ -247,12 +246,14 @@ gimp_clone_tool_cursor_update (GimpTool *tool,
if (gimp_display_coords_in_active_drawable (gdisp, coords))
{
GimpChannel *selection = gimp_image_get_mask (gdisp->gimage);
/* One more test--is there a selected region?
* if so, is cursor inside?
*/
if (gimp_image_mask_is_empty (gdisp->gimage))
if (gimp_channel_is_empty (selection))
ctype = GIMP_MOUSE_CURSOR;
else if (gimp_image_mask_value (gdisp->gimage, coords->x, coords->y))
else if (gimp_channel_value (selection, coords->x, coords->y))
ctype = GIMP_MOUSE_CURSOR;
}
......
......@@ -609,8 +609,9 @@ gimp_transform_tool_cursor_update (GimpTool *tool,
if (tr_tool->use_grid)
{
GdkCursorType ctype = GDK_TOP_LEFT_ARROW;
GimpCursorModifier cmodifier = GIMP_CURSOR_MODIFIER_NONE;
GimpChannel *selection = gimp_image_get_mask (gdisp->gimage);
GdkCursorType ctype = GDK_TOP_LEFT_ARROW;
GimpCursorModifier cmodifier = GIMP_CURSOR_MODIFIER_NONE;
switch (options->type)
{
......@@ -629,9 +630,8 @@ gimp_transform_tool_cursor_update (GimpTool *tool,
}
else if (gimp_display_coords_in_active_drawable (gdisp, coords))
{
if (gimp_image_mask_is_empty (gdisp->gimage) ||
gimp_image_mask_value (gdisp->gimage,
coords->x, coords->y))
if (gimp_channel_is_empty (selection) ||
gimp_channel_value (selection, coords->x, coords->y))
{
ctype = GIMP_MOUSE_CURSOR;
}
......@@ -641,8 +641,8 @@ gimp_transform_tool_cursor_update (GimpTool *tool,
break;
case GIMP_TRANSFORM_TYPE_SELECTION:
if (gimp_image_mask_is_empty (gdisp->gimage) ||
gimp_image_mask_value (gdisp->gimage, coords->x, coords->y))
if (gimp_channel_is_empty (selection) ||
gimp_channel_value (selection, coords->x, coords->y))
{
ctype = GIMP_MOUSE_CURSOR;
}
......
......@@ -175,10 +175,12 @@ HELP
%invoke = (
headers => [ qw ("core/gimpdrawable-bucket-fill.h"
"core/gimpimage-mask.h") ],
"core/gimpchannel.h") ],
code => <<'CODE'
{
if (! gimp_item_get_image (GIMP_ITEM (drawable)))
GimpImage *gimage = gimp_item_get_image (GIMP_ITEM (drawable));
if (! gimage)
{
success = FALSE;
}
......@@ -186,7 +188,7 @@ HELP
{
gboolean do_seed_fill;
do_seed_fill = gimp_image_mask_is_empty (gimp_item_get_image (GIMP_ITEM (drawable)));
do_seed_fill = gimp_channel_is_empty (gimp_image_get_mask (gimage));
gimp_drawable_bucket_fill (drawable, fill_mode,
paint_mode, opacity / 100.0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment