mirror of https://github.com/GNOME/gimp.git
app: remove non-cut/copy/paste functions from gimp-edit.[ch]
Move them to the new files gimpdrawable-edit.[ch] and gimpimage-fade.[ch].
This commit is contained in:
parent
7caa339855
commit
428110f63f
|
@ -32,6 +32,7 @@
|
|||
#include "core/gimpbuffer.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpdrawable-edit.h"
|
||||
#include "core/gimpfilloptions.h"
|
||||
#include "core/gimplayer.h"
|
||||
#include "core/gimplayer-new.h"
|
||||
|
@ -480,7 +481,7 @@ edit_clear_cmd_callback (GtkAction *action,
|
|||
GimpDrawable *drawable;
|
||||
return_if_no_drawable (image, drawable, data);
|
||||
|
||||
gimp_edit_clear (image, drawable, action_data_get_context (data));
|
||||
gimp_drawable_edit_clear (drawable, action_data_get_context (data));
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
||||
|
@ -504,7 +505,7 @@ edit_fill_cmd_callback (GtkAction *action,
|
|||
action_data_get_context (data),
|
||||
fill_type, &error))
|
||||
{
|
||||
gimp_edit_fill (image, drawable, options, NULL);
|
||||
gimp_drawable_edit_fill (drawable, options, NULL);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -154,6 +154,8 @@ libappcore_a_sources = \
|
|||
gimpdrawable-bucket-fill.h \
|
||||
gimpdrawable-combine.c \
|
||||
gimpdrawable-combine.h \
|
||||
gimpdrawable-edit.c \
|
||||
gimpdrawable-edit.h \
|
||||
gimpdrawable-equalize.c \
|
||||
gimpdrawable-equalize.h \
|
||||
gimpdrawable-fill.c \
|
||||
|
@ -251,6 +253,8 @@ libappcore_a_sources = \
|
|||
gimpimage-crop.h \
|
||||
gimpimage-duplicate.c \
|
||||
gimpimage-duplicate.h \
|
||||
gimpimage-fade.c \
|
||||
gimpimage-fade.h \
|
||||
gimpimage-flip.c \
|
||||
gimpimage-flip.h \
|
||||
gimpimage-grid.h \
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <cairo.h>
|
||||
#include <gegl.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
@ -28,16 +26,10 @@
|
|||
|
||||
#include "core-types.h"
|
||||
|
||||
#include "gegl/gimp-gegl-utils.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimp-edit.h"
|
||||
#include "gimp-utils.h"
|
||||
#include "gimpbuffer.h"
|
||||
#include "gimpchannel.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpfilloptions.h"
|
||||
#include "gimpdrawableundo.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-duplicate.h"
|
||||
#include "gimpimage-new.h"
|
||||
|
@ -48,7 +40,6 @@
|
|||
#include "gimplist.h"
|
||||
#include "gimppickable.h"
|
||||
#include "gimpselection.h"
|
||||
#include "gimptempbuf.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
@ -700,116 +691,6 @@ gimp_edit_named_copy_visible (GimpImage *image,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_edit_clear (GimpImage *image,
|
||||
GimpDrawable *drawable,
|
||||
GimpContext *context)
|
||||
{
|
||||
GimpFillOptions *options;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (image));
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
|
||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||
|
||||
options = gimp_fill_options_new (context->gimp, NULL, FALSE);
|
||||
|
||||
if (gimp_drawable_has_alpha (drawable))
|
||||
gimp_fill_options_set_by_fill_type (options, context,
|
||||
GIMP_FILL_TRANSPARENT, NULL);
|
||||
else
|
||||
gimp_fill_options_set_by_fill_type (options, context,
|
||||
GIMP_FILL_BACKGROUND, NULL);
|
||||
|
||||
gimp_edit_fill (image, drawable, options, C_("undo-type", "Clear"));
|
||||
|
||||
g_object_unref (options);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_edit_fill (GimpImage *image,
|
||||
GimpDrawable *drawable,
|
||||
GimpFillOptions *options,
|
||||
const gchar *undo_desc)
|
||||
{
|
||||
GeglBuffer *buffer;
|
||||
gint x, y, width, height;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (image));
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
|
||||
g_return_if_fail (GIMP_IS_FILL_OPTIONS (options));
|
||||
|
||||
if (! gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
|
||||
return; /* nothing to do, but the fill succeeded */
|
||||
|
||||
buffer = gimp_fill_options_create_buffer (options, drawable,
|
||||
GEGL_RECTANGLE (0, 0,
|
||||
width, height));
|
||||
|
||||
if (! undo_desc)
|
||||
undo_desc = gimp_fill_options_get_undo_desc (options);
|
||||
|
||||
gimp_drawable_apply_buffer (drawable, buffer,
|
||||
GEGL_RECTANGLE (0, 0, width, height),
|
||||
TRUE, undo_desc,
|
||||
gimp_context_get_opacity (GIMP_CONTEXT (options)),
|
||||
gimp_context_get_paint_mode (GIMP_CONTEXT (options)),
|
||||
GIMP_LAYER_COLOR_SPACE_AUTO,
|
||||
GIMP_LAYER_COLOR_SPACE_AUTO,
|
||||
GIMP_LAYER_COMPOSITE_AUTO,
|
||||
NULL, x, y);
|
||||
|
||||
g_object_unref (buffer);
|
||||
|
||||
gimp_drawable_update (drawable, x, y, width, height);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_edit_fade (GimpImage *image,
|
||||
GimpContext *context)
|
||||
{
|
||||
GimpDrawableUndo *undo;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
|
||||
|
||||
undo = GIMP_DRAWABLE_UNDO (gimp_image_undo_get_fadeable (image));
|
||||
|
||||
if (undo && undo->applied_buffer)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
GeglBuffer *buffer;
|
||||
|
||||
drawable = GIMP_DRAWABLE (GIMP_ITEM_UNDO (undo)->item);
|
||||
|
||||
g_object_ref (undo);
|
||||
buffer = g_object_ref (undo->applied_buffer);
|
||||
|
||||
gimp_image_undo (image);
|
||||
|
||||
gimp_drawable_apply_buffer (drawable, buffer,
|
||||
GEGL_RECTANGLE (0, 0,
|
||||
gegl_buffer_get_width (undo->buffer),
|
||||
gegl_buffer_get_height (undo->buffer)),
|
||||
TRUE,
|
||||
gimp_object_get_name (undo),
|
||||
gimp_context_get_opacity (context),
|
||||
gimp_context_get_paint_mode (context),
|
||||
GIMP_LAYER_COLOR_SPACE_AUTO,
|
||||
GIMP_LAYER_COLOR_SPACE_AUTO,
|
||||
GIMP_LAYER_COMPOSITE_AUTO,
|
||||
NULL, undo->x, undo->y);
|
||||
|
||||
g_object_unref (buffer);
|
||||
g_object_unref (undo);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
|
|
|
@ -57,16 +57,5 @@ const gchar * gimp_edit_named_copy_visible (GimpImage *image,
|
|||
GimpContext *context,
|
||||
GError **error);
|
||||
|
||||
void gimp_edit_clear (GimpImage *image,
|
||||
GimpDrawable *drawable,
|
||||
GimpContext *context);
|
||||
void gimp_edit_fill (GimpImage *image,
|
||||
GimpDrawable *drawable,
|
||||
GimpFillOptions *options,
|
||||
const gchar *undo_desc);
|
||||
|
||||
gboolean gimp_edit_fade (GimpImage *image,
|
||||
GimpContext *context);
|
||||
|
||||
|
||||
#endif /* __GIMP_EDIT_H__ */
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "core-types.h"
|
||||
|
||||
#include "gimpdrawable.h"
|
||||
#include "gimpdrawable-edit.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpfilloptions.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
void
|
||||
gimp_drawable_edit_clear (GimpDrawable *drawable,
|
||||
GimpContext *context)
|
||||
{
|
||||
GimpFillOptions *options;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
|
||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||
|
||||
options = gimp_fill_options_new (context->gimp, NULL, FALSE);
|
||||
|
||||
if (gimp_drawable_has_alpha (drawable))
|
||||
gimp_fill_options_set_by_fill_type (options, context,
|
||||
GIMP_FILL_TRANSPARENT, NULL);
|
||||
else
|
||||
gimp_fill_options_set_by_fill_type (options, context,
|
||||
GIMP_FILL_BACKGROUND, NULL);
|
||||
|
||||
gimp_drawable_edit_fill (drawable, options, C_("undo-type", "Clear"));
|
||||
|
||||
g_object_unref (options);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_drawable_edit_fill (GimpDrawable *drawable,
|
||||
GimpFillOptions *options,
|
||||
const gchar *undo_desc)
|
||||
{
|
||||
GeglBuffer *buffer;
|
||||
gint x, y, width, height;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
|
||||
g_return_if_fail (GIMP_IS_FILL_OPTIONS (options));
|
||||
|
||||
if (! gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
|
||||
return; /* nothing to do, but the fill succeeded */
|
||||
|
||||
buffer = gimp_fill_options_create_buffer (options, drawable,
|
||||
GEGL_RECTANGLE (0, 0,
|
||||
width, height));
|
||||
|
||||
if (! undo_desc)
|
||||
undo_desc = gimp_fill_options_get_undo_desc (options);
|
||||
|
||||
gimp_drawable_apply_buffer (drawable, buffer,
|
||||
GEGL_RECTANGLE (0, 0, width, height),
|
||||
TRUE, undo_desc,
|
||||
gimp_context_get_opacity (GIMP_CONTEXT (options)),
|
||||
gimp_context_get_paint_mode (GIMP_CONTEXT (options)),
|
||||
GIMP_LAYER_COLOR_SPACE_AUTO,
|
||||
GIMP_LAYER_COLOR_SPACE_AUTO,
|
||||
GIMP_LAYER_COMPOSITE_AUTO,
|
||||
NULL, x, y);
|
||||
|
||||
g_object_unref (buffer);
|
||||
|
||||
gimp_drawable_update (drawable, x, y, width, height);
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_DRAWABLE_EDIT_H__
|
||||
#define __GIMP_DRAWABLE_EDIT_H__
|
||||
|
||||
|
||||
void gimp_drawable_edit_clear (GimpDrawable *drawable,
|
||||
GimpContext *context);
|
||||
void gimp_drawable_edit_fill (GimpDrawable *drawable,
|
||||
GimpFillOptions *options,
|
||||
const gchar *undo_desc);
|
||||
|
||||
|
||||
#endif /* __GIMP_DRAWABLE_EDIT_H__ */
|
|
@ -0,0 +1,78 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "core-types.h"
|
||||
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpdrawable.h"
|
||||
#include "gimpdrawableundo.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-fade.h"
|
||||
#include "gimpimage-undo.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
gboolean
|
||||
gimp_image_fade (GimpImage *image,
|
||||
GimpContext *context)
|
||||
{
|
||||
GimpDrawableUndo *undo;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
|
||||
|
||||
undo = GIMP_DRAWABLE_UNDO (gimp_image_undo_get_fadeable (image));
|
||||
|
||||
if (undo && undo->applied_buffer)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
GeglBuffer *buffer;
|
||||
|
||||
drawable = GIMP_DRAWABLE (GIMP_ITEM_UNDO (undo)->item);
|
||||
|
||||
g_object_ref (undo);
|
||||
buffer = g_object_ref (undo->applied_buffer);
|
||||
|
||||
gimp_image_undo (image);
|
||||
|
||||
gimp_drawable_apply_buffer (drawable, buffer,
|
||||
GEGL_RECTANGLE (0, 0,
|
||||
gegl_buffer_get_width (undo->buffer),
|
||||
gegl_buffer_get_height (undo->buffer)),
|
||||
TRUE,
|
||||
gimp_object_get_name (undo),
|
||||
gimp_context_get_opacity (context),
|
||||
gimp_context_get_paint_mode (context),
|
||||
GIMP_LAYER_COLOR_SPACE_AUTO,
|
||||
GIMP_LAYER_COLOR_SPACE_AUTO,
|
||||
GIMP_LAYER_COMPOSITE_AUTO,
|
||||
NULL, undo->x, undo->y);
|
||||
|
||||
g_object_unref (buffer);
|
||||
g_object_unref (undo);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_IMAGE_FADE_H__
|
||||
#define __GIMP_IMAGE_FADE_H__
|
||||
|
||||
|
||||
gboolean gimp_image_fade (GimpImage *image,
|
||||
GimpContext *context);
|
||||
|
||||
|
||||
#endif /* __GIMP_IMAGE_FADE_H__ */
|
|
@ -29,8 +29,8 @@
|
|||
#include "gegl/gimp-gegl-apply-operation.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimp-edit.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpdrawable-edit.h"
|
||||
#include "gimpdrawable-private.h"
|
||||
#include "gimperror.h"
|
||||
#include "gimpimage.h"
|
||||
|
@ -751,7 +751,7 @@ gimp_selection_extract (GimpSelection *selection,
|
|||
|
||||
if (cut_image)
|
||||
{
|
||||
gimp_edit_clear (image, GIMP_DRAWABLE (pickable), context);
|
||||
gimp_drawable_edit_clear (GIMP_DRAWABLE (pickable), context);
|
||||
}
|
||||
}
|
||||
else if (cut_image)
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
|
||||
#include "dialogs-types.h"
|
||||
|
||||
#include "core/gimp-edit.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-fade.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpdrawableundo.h"
|
||||
|
@ -206,7 +206,7 @@ fade_dialog_response (GtkWidget *dialog,
|
|||
static void
|
||||
fade_dialog_context_changed (FadeDialog *private)
|
||||
{
|
||||
if (gimp_edit_fade (private->image, private->context))
|
||||
if (gimp_image_fade (private->image, private->context))
|
||||
{
|
||||
private->applied = TRUE;
|
||||
gimp_image_flush (private->image);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "core/gimp.h"
|
||||
#include "core/gimp-edit.h"
|
||||
#include "core/gimpbuffer.h"
|
||||
#include "core/gimpdrawable-edit.h"
|
||||
#include "core/gimpfilloptions.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-new.h"
|
||||
|
@ -385,7 +386,7 @@ gimp_display_shell_dnd_fill (GimpDisplayShell *shell,
|
|||
}
|
||||
else
|
||||
{
|
||||
gimp_edit_fill (image, drawable, options, undo_desc);
|
||||
gimp_drawable_edit_fill (drawable, options, undo_desc);
|
||||
}
|
||||
|
||||
gimp_display_shell_dnd_flush (shell, image);
|
||||
|
|
|
@ -29,11 +29,11 @@
|
|||
|
||||
#include "pdb-types.h"
|
||||
|
||||
#include "core/gimp-edit.h"
|
||||
#include "core/gimp-gradients.h"
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpbuffer.h"
|
||||
#include "core/gimpdrawable-bucket-fill.h"
|
||||
#include "core/gimpdrawable-edit.h"
|
||||
#include "core/gimpdrawable-gradient.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
@ -71,9 +71,7 @@ drawable_edit_clear_invoker (GimpProcedure *procedure,
|
|||
GIMP_PDB_ITEM_CONTENT, error) &&
|
||||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
|
||||
gimp_edit_clear (image, drawable, context);
|
||||
gimp_drawable_edit_clear (drawable, context);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
@ -104,7 +102,6 @@ drawable_edit_fill_invoker (GimpProcedure *procedure,
|
|||
GIMP_PDB_ITEM_CONTENT, error) &&
|
||||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
|
||||
|
||||
gimp_context_set_opacity (GIMP_CONTEXT (options),
|
||||
|
@ -115,7 +112,7 @@ drawable_edit_fill_invoker (GimpProcedure *procedure,
|
|||
if (gimp_fill_options_set_by_fill_type (options, context,
|
||||
fill_type, error))
|
||||
{
|
||||
gimp_edit_fill (image, drawable, options, NULL);
|
||||
gimp_drawable_edit_fill (drawable, options, NULL);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "core/gimpbuffer.h"
|
||||
#include "core/gimpchannel.h"
|
||||
#include "core/gimpdrawable-bucket-fill.h"
|
||||
#include "core/gimpdrawable-edit.h"
|
||||
#include "core/gimpdrawable-gradient.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
@ -524,9 +525,7 @@ edit_clear_invoker (GimpProcedure *procedure,
|
|||
GIMP_PDB_ITEM_CONTENT, error) &&
|
||||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
|
||||
gimp_edit_clear (image, drawable, context);
|
||||
gimp_drawable_edit_clear (drawable, context);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
@ -557,13 +556,12 @@ edit_fill_invoker (GimpProcedure *procedure,
|
|||
GIMP_PDB_ITEM_CONTENT, error) &&
|
||||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
|
||||
|
||||
if (gimp_fill_options_set_by_fill_type (options, context,
|
||||
fill_type, error))
|
||||
{
|
||||
gimp_edit_fill (image, drawable, options, NULL);
|
||||
gimp_drawable_edit_fill (drawable, options, NULL);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
@ -625,7 +623,7 @@ edit_bucket_fill_invoker (GimpProcedure *procedure,
|
|||
|
||||
if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
|
||||
{
|
||||
gimp_edit_fill (image, drawable, options, NULL);
|
||||
gimp_drawable_edit_fill (drawable, options, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -702,7 +700,7 @@ edit_bucket_fill_full_invoker (GimpProcedure *procedure,
|
|||
|
||||
if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
|
||||
{
|
||||
gimp_edit_fill (image, drawable, options, NULL);
|
||||
gimp_drawable_edit_fill (drawable, options, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
#include "tools-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-edit.h"
|
||||
#include "core/gimpdrawable-bucket-fill.h"
|
||||
#include "core/gimpdrawable-edit.h"
|
||||
#include "core/gimperror.h"
|
||||
#include "core/gimpfilloptions.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
@ -191,7 +191,7 @@ gimp_bucket_fill_tool_button_release (GimpTool *tool,
|
|||
|
||||
if (options->fill_selection)
|
||||
{
|
||||
gimp_edit_fill (image, drawable, fill_options, NULL);
|
||||
gimp_drawable_edit_fill (drawable, fill_options, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
#include "widgets-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimp-edit.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpdrawable-edit.h"
|
||||
#include "core/gimpfilloptions.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
|
@ -242,9 +242,9 @@ gimp_drawable_tree_view_drop_viewable (GimpContainerTreeView *view,
|
|||
gimp_context_set_pattern (GIMP_CONTEXT (options),
|
||||
GIMP_PATTERN (src_viewable));
|
||||
|
||||
gimp_edit_fill (image, GIMP_DRAWABLE (dest_viewable),
|
||||
options,
|
||||
C_("undo-type", "Drop pattern to layer"));
|
||||
gimp_drawable_edit_fill (GIMP_DRAWABLE (dest_viewable),
|
||||
options,
|
||||
C_("undo-type", "Drop pattern to layer"));
|
||||
|
||||
g_object_unref (options);
|
||||
|
||||
|
@ -272,9 +272,9 @@ gimp_drawable_tree_view_drop_color (GimpContainerTreeView *view,
|
|||
gimp_fill_options_set_style (options, GIMP_FILL_STYLE_SOLID);
|
||||
gimp_context_set_foreground (GIMP_CONTEXT (options), color);
|
||||
|
||||
gimp_edit_fill (image, GIMP_DRAWABLE (dest_viewable),
|
||||
options,
|
||||
C_("undo-type", "Drop color to layer"));
|
||||
gimp_drawable_edit_fill (GIMP_DRAWABLE (dest_viewable),
|
||||
options,
|
||||
C_("undo-type", "Drop color to layer"));
|
||||
|
||||
g_object_unref (options);
|
||||
|
||||
|
@ -333,7 +333,7 @@ gimp_drawable_tree_view_new_dropped (GimpItemTreeView *view,
|
|||
item = GIMP_ITEM_TREE_VIEW_GET_CLASS (view)->new_item (image);
|
||||
|
||||
if (item)
|
||||
gimp_edit_fill (image, GIMP_DRAWABLE (item), options, undo_desc);
|
||||
gimp_drawable_edit_fill (GIMP_DRAWABLE (item), options, undo_desc);
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
|
|
|
@ -45,9 +45,7 @@ HELP
|
|||
GIMP_PDB_ITEM_CONTENT, error) &&
|
||||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
|
||||
gimp_edit_clear (image, drawable, context);
|
||||
gimp_drawable_edit_clear (drawable, context);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
@ -91,7 +89,6 @@ HELP
|
|||
GIMP_PDB_ITEM_CONTENT, error) &&
|
||||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
|
||||
|
||||
gimp_context_set_opacity (GIMP_CONTEXT (options),
|
||||
|
@ -102,7 +99,7 @@ HELP
|
|||
if (gimp_fill_options_set_by_fill_type (options, context,
|
||||
fill_type, error))
|
||||
{
|
||||
gimp_edit_fill (image, drawable, options, NULL);
|
||||
gimp_drawable_edit_fill (drawable, options, NULL);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
@ -426,7 +423,7 @@ CODE
|
|||
@headers = qw("libgimpconfig/gimpconfig.h"
|
||||
"paint/gimppaintoptions.h"
|
||||
"core/gimp.h"
|
||||
"core/gimp-edit.h"
|
||||
"core/gimpdrawable-edit.h"
|
||||
"core/gimpbuffer.h"
|
||||
"core/gimpimage.h"
|
||||
"core/gimpprogress.h"
|
||||
|
|
|
@ -533,9 +533,7 @@ HELP
|
|||
GIMP_PDB_ITEM_CONTENT, error) &&
|
||||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
|
||||
gimp_edit_clear (image, drawable, context);
|
||||
gimp_drawable_edit_clear (drawable, context);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
@ -577,13 +575,12 @@ HELP
|
|||
GIMP_PDB_ITEM_CONTENT, error) &&
|
||||
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
|
||||
{
|
||||
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
|
||||
|
||||
if (gimp_fill_options_set_by_fill_type (options, context,
|
||||
fill_type, error))
|
||||
{
|
||||
gimp_edit_fill (image, drawable, options, NULL);
|
||||
gimp_drawable_edit_fill (drawable, options, NULL);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
@ -672,7 +669,7 @@ HELP
|
|||
|
||||
if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
|
||||
{
|
||||
gimp_edit_fill (image, drawable, options, NULL);
|
||||
gimp_drawable_edit_fill (drawable, options, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -780,7 +777,7 @@ HELP
|
|||
|
||||
if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
|
||||
{
|
||||
gimp_edit_fill (image, drawable, options, NULL);
|
||||
gimp_drawable_edit_fill (drawable, options, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1043,6 +1040,7 @@ CODE
|
|||
@headers = qw("libgimpconfig/gimpconfig.h"
|
||||
"core/gimp.h"
|
||||
"core/gimp-edit.h"
|
||||
"core/gimpdrawable-edit.h"
|
||||
"core/gimpbuffer.h"
|
||||
"core/gimpimage.h"
|
||||
"core/gimpprogress.h"
|
||||
|
|
|
@ -132,6 +132,7 @@ app/core/gimpdata.c
|
|||
app/core/gimpdatafactory.c
|
||||
app/core/gimpdrawable.c
|
||||
app/core/gimpdrawable-bucket-fill.c
|
||||
app/core/gimpdrawable-edit.c
|
||||
app/core/gimpdrawable-equalize.c
|
||||
app/core/gimpdrawable-floating-selection.c
|
||||
app/core/gimpdrawable-foreground-extract.c
|
||||
|
|
Loading…
Reference in New Issue