mirror of https://github.com/GNOME/gimp.git
use gimp_tile_cache_ntiles () when creating a new image, disable undo,
* plug-ins/common/colorify.c: use gimp_tile_cache_ntiles () * plug-ins/common/lic.c: when creating a new image, disable undo, enable it later when the new image is completed --Sven
This commit is contained in:
parent
fa30ba04c7
commit
ed491085a2
|
@ -1,3 +1,9 @@
|
|||
Tue Jan 25 20:08:35 CET 2000 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/common/colorify.c: use gimp_tile_cache_ntiles ()
|
||||
* plug-ins/common/lic.c: when creating a new image, disable undo, enable
|
||||
it later when the new image is completed
|
||||
|
||||
2000-01-25 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* configure.in
|
||||
|
|
|
@ -259,6 +259,8 @@ colorify (GDrawable *drawable)
|
|||
bpp = gimp_drawable_bpp (drawable->id);
|
||||
row = g_new (guchar, sel_width * bpp);
|
||||
|
||||
gimp_tile_cache_ntiles (2 * (sel_width / gimp_tile_width()) + 1);
|
||||
|
||||
gimp_pixel_rgn_init (&source_region, drawable,
|
||||
sel_x1, sel_y1, sel_width, sel_height, FALSE, FALSE);
|
||||
gimp_pixel_rgn_init (&dest_region, drawable,
|
||||
|
@ -271,7 +273,7 @@ colorify (GDrawable *drawable)
|
|||
colorify_row (row, sel_width, bpp);
|
||||
|
||||
gimp_pixel_rgn_set_row (&dest_region, row, sel_x1, y, sel_width);
|
||||
gimp_progress_update ((double) ++progress / sel_height);
|
||||
gimp_progress_update ((double) ++progress / (double) sel_height);
|
||||
}
|
||||
|
||||
g_free (row);
|
||||
|
|
|
@ -891,16 +891,17 @@ compute_image (void)
|
|||
/* Create a new image */
|
||||
/* ================== */
|
||||
|
||||
new_image_id=gimp_image_new(width,height,RGB);
|
||||
|
||||
new_image_id = gimp_image_new (width, height, RGB);
|
||||
gimp_image_undo_disable (new_image_id);
|
||||
|
||||
/* Create a "normal" layer */
|
||||
/* ======================= */
|
||||
|
||||
new_layer_id=gimp_layer_new(new_image_id, _("Background"),
|
||||
width,height,RGB_IMAGE,100.0,NORMAL_MODE);
|
||||
new_layer_id = gimp_layer_new (new_image_id, _("Background"),
|
||||
width, height, RGB_IMAGE, 100.0, NORMAL_MODE);
|
||||
|
||||
gimp_image_add_layer(new_image_id,new_layer_id,0);
|
||||
output_drawable=gimp_drawable_get(new_layer_id);
|
||||
gimp_image_add_layer (new_image_id, new_layer_id, 0);
|
||||
output_drawable = gimp_drawable_get (new_layer_id);
|
||||
}
|
||||
|
||||
gimp_pixel_rgn_init (&dest_region, output_drawable, 0,0, width,height, TRUE,TRUE);
|
||||
|
@ -951,11 +952,12 @@ compute_image (void)
|
|||
gimp_drawable_merge_shadow(output_drawable->id, TRUE);
|
||||
gimp_drawable_update(output_drawable->id, 0,0, width,height);
|
||||
|
||||
if (new_image_id!=-1)
|
||||
if (new_image_id != -1)
|
||||
{
|
||||
gimp_display_new(new_image_id);
|
||||
gimp_displays_flush();
|
||||
gimp_drawable_detach(output_drawable);
|
||||
gimp_display_new (new_image_id);
|
||||
gimp_displays_flush ();
|
||||
gimp_drawable_detach (output_drawable);
|
||||
gimp_image_undo_enable (new_image_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue