mirror of https://github.com/GNOME/gimp.git
plug-ins: port fractal-explorer to GimpImage|Drawable.
This commit is contained in:
parent
6db115e475
commit
7838c7f2b2
|
@ -34,7 +34,6 @@ fractal_explorer_SOURCES = \
|
|||
fractal-explorer.h
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DGIMP_DEPRECATED_REPLACE_NEW_API \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_CFLAGS) \
|
||||
$(GEGL_CFLAGS) \
|
||||
|
|
|
@ -95,12 +95,12 @@ static GimpProcedure * explorer_create_procedure (GimpPlugIn *plug_in
|
|||
|
||||
static GimpValueArray * explorer_run (GimpProcedure *procedure,
|
||||
GimpRunMode run_mode,
|
||||
gint32 image_id,
|
||||
gint32 drawable_id,
|
||||
GimpImage *image,
|
||||
GimpDrawable *drawable,
|
||||
const GimpValueArray *args,
|
||||
gpointer run_data);
|
||||
|
||||
static void explorer (gint32 drawable_id);
|
||||
static void explorer (GimpDrawable *drawable);
|
||||
|
||||
static void delete_dialog_callback (GtkWidget *widget,
|
||||
gboolean value,
|
||||
|
@ -370,8 +370,8 @@ explorer_create_procedure (GimpPlugIn *plug_in,
|
|||
static GimpValueArray *
|
||||
explorer_run (GimpProcedure *procedure,
|
||||
GimpRunMode run_mode,
|
||||
gint32 image_id,
|
||||
gint32 drawable_id,
|
||||
GimpImage *image,
|
||||
GimpDrawable *drawable,
|
||||
const GimpValueArray *args,
|
||||
gpointer run_data)
|
||||
{
|
||||
|
@ -384,7 +384,7 @@ explorer_run (GimpProcedure *procedure,
|
|||
INIT_I18N ();
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
if (! gimp_drawable_mask_intersect (drawable_id,
|
||||
if (! gimp_drawable_mask_intersect (drawable,
|
||||
&sel_x, &sel_y,
|
||||
&sel_width, &sel_height))
|
||||
{
|
||||
|
@ -464,7 +464,7 @@ explorer_run (GimpProcedure *procedure,
|
|||
{
|
||||
gimp_progress_init (_("Rendering fractal"));
|
||||
|
||||
explorer (drawable_id);
|
||||
explorer (drawable);
|
||||
|
||||
if (run_mode != GIMP_RUN_NONINTERACTIVE)
|
||||
gimp_displays_flush ();
|
||||
|
@ -483,7 +483,7 @@ explorer_run (GimpProcedure *procedure,
|
|||
*********************************************************************/
|
||||
|
||||
static void
|
||||
explorer (gint32 drawable_id)
|
||||
explorer (GimpDrawable *drawable)
|
||||
{
|
||||
GeglBuffer *src_buffer;
|
||||
GeglBuffer *dest_buffer;
|
||||
|
@ -505,16 +505,16 @@ explorer (gint32 drawable_id)
|
|||
* need to be done for correct operation. (It simply makes it go
|
||||
* faster, since fewer pixels need to be operated on).
|
||||
*/
|
||||
if (! gimp_drawable_mask_intersect (drawable_id, &x, &y, &w, &h))
|
||||
if (! gimp_drawable_mask_intersect (drawable, &x, &y, &w, &h))
|
||||
return;
|
||||
|
||||
/* Get the size of the input image. (This will/must be the same
|
||||
* as the size of the output image.
|
||||
*/
|
||||
width = gimp_drawable_width (drawable_id);
|
||||
height = gimp_drawable_height (drawable_id);
|
||||
width = gimp_drawable_width (drawable);
|
||||
height = gimp_drawable_height (drawable);
|
||||
|
||||
if (gimp_drawable_has_alpha (drawable_id))
|
||||
if (gimp_drawable_has_alpha (drawable))
|
||||
format = babl_format ("R'G'B'A u8");
|
||||
else
|
||||
format = babl_format ("R'G'B' u8");
|
||||
|
@ -525,8 +525,8 @@ explorer (gint32 drawable_id)
|
|||
src_row = g_new (guchar, bpp * w);
|
||||
dest_row = g_new (guchar, bpp * w);
|
||||
|
||||
src_buffer = gimp_drawable_get_buffer (drawable_id);
|
||||
dest_buffer = gimp_drawable_get_shadow_buffer (drawable_id);
|
||||
src_buffer = gimp_drawable_get_buffer (drawable);
|
||||
dest_buffer = gimp_drawable_get_shadow_buffer (drawable);
|
||||
|
||||
xbild = width;
|
||||
ybild = height;
|
||||
|
@ -562,8 +562,8 @@ explorer (gint32 drawable_id)
|
|||
gimp_progress_update (1.0);
|
||||
|
||||
/* update the processed region */
|
||||
gimp_drawable_merge_shadow (drawable_id, TRUE);
|
||||
gimp_drawable_update (drawable_id, x, y, w, h);
|
||||
gimp_drawable_merge_shadow (drawable, TRUE);
|
||||
gimp_drawable_update (drawable, x, y, w, h);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
|
Loading…
Reference in New Issue