mirror of https://github.com/GNOME/gimp.git
plug-ins: use gimp_get_default_new_layer_mode() for most new layers
instead of hardcoding NORMAL_LEGACY.
This commit is contained in:
parent
59fae30b53
commit
838449254a
|
@ -661,7 +661,7 @@ gimp_image_metadata_load_thumbnail (GFile *file,
|
|||
layer_ID = gimp_layer_new_from_pixbuf (image_ID, _("Background"),
|
||||
pixbuf,
|
||||
100.0,
|
||||
GIMP_LAYER_MODE_NORMAL,
|
||||
gimp_get_default_new_layer_mode (),
|
||||
0.0, 0.0);
|
||||
g_object_unref (pixbuf);
|
||||
|
||||
|
|
|
@ -642,7 +642,7 @@ do_optimizations (GimpRunMode run_mode,
|
|||
width, height,
|
||||
drawabletype_alpha,
|
||||
100.0,
|
||||
GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
gimp_get_default_new_layer_mode ());
|
||||
|
||||
gimp_image_insert_layer (new_image_id, new_layer_id, -1, 0);
|
||||
|
||||
|
@ -1065,7 +1065,7 @@ do_optimizations (GimpRunMode run_mode,
|
|||
bbox_bottom-bbox_top,
|
||||
drawabletype_alpha,
|
||||
100.0,
|
||||
GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
gimp_get_default_new_layer_mode ());
|
||||
g_free (newlayer_name);
|
||||
|
||||
gimp_image_insert_layer (new_image_id, new_layer_id, -1, 0);
|
||||
|
|
|
@ -1021,7 +1021,7 @@ create_new_image (const gchar *filename,
|
|||
|
||||
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
|
||||
gdtype,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
|
||||
|
||||
*buffer = gimp_drawable_get_buffer (*layer_ID);
|
||||
|
|
|
@ -608,7 +608,7 @@ create_new_layer (gint32 image_ID,
|
|||
|
||||
layer_ID = gimp_layer_new (image_ID, layername, width, height,
|
||||
gdtype,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, position);
|
||||
|
||||
return layer_ID;
|
||||
|
|
|
@ -993,7 +993,7 @@ preview_update_preview (GimpPreview *preview,
|
|||
preview_id = gimp_layer_new (image_id, "preview", width, height,
|
||||
gimp_drawable_type (drawable->drawable_id),
|
||||
100,
|
||||
GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
gimp_get_default_new_layer_mode ());
|
||||
preview_drawable = gimp_drawable_get (preview_id);
|
||||
gimp_image_insert_layer (image_id, preview_id, -1, 0);
|
||||
gimp_layer_set_offsets (preview_id, 0, 0);
|
||||
|
|
|
@ -440,11 +440,11 @@ load_image (const gchar *file,
|
|||
if (bpp == 32)
|
||||
layer = gimp_layer_new (image, _("Background"), width, height,
|
||||
GIMP_RGBA_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
else
|
||||
layer = gimp_layer_new (image, _("Background"), width, height,
|
||||
GIMP_INDEXEDA_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image, layer, -1, 0);
|
||||
gimp_layer_set_offsets (layer, offx, offy);
|
||||
|
||||
|
|
|
@ -612,7 +612,7 @@ load_image (const gchar *filename,
|
|||
dicominfo->width, dicominfo->height,
|
||||
(dicominfo->samples_per_pixel >= 3 ?
|
||||
GIMP_RGB_IMAGE : GIMP_GRAY_IMAGE),
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
|
||||
|
||||
buffer = gimp_drawable_get_buffer (layer_ID);
|
||||
|
|
|
@ -622,7 +622,7 @@ load_image (GFile *file,
|
|||
|
||||
layer_ID = gimp_layer_new (image_ID, name, bh.width, bh.height,
|
||||
image_type,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
|
||||
|
||||
g_free (name);
|
||||
|
|
|
@ -414,7 +414,7 @@ load_image (const gchar *filename,
|
|||
_("Background"),
|
||||
width, height,
|
||||
image_type,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
|
||||
dest_buf = gimp_drawable_get_buffer (layer_ID);
|
||||
|
||||
|
|
|
@ -989,14 +989,14 @@ ReadImage (FILE *fd,
|
|||
layer_ID = gimp_layer_new (*image_ID, framename,
|
||||
len, height,
|
||||
GIMP_INDEXED_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
}
|
||||
else
|
||||
{
|
||||
layer_ID = gimp_layer_new (*image_ID, framename,
|
||||
len, height,
|
||||
GIMP_INDEXEDA_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
alpha_frame=TRUE;
|
||||
}
|
||||
|
||||
|
@ -1081,7 +1081,7 @@ ReadImage (FILE *fd,
|
|||
len, height,
|
||||
promote_to_rgb ?
|
||||
GIMP_RGBA_IMAGE : GIMP_INDEXEDA_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
alpha_frame = TRUE;
|
||||
g_free (framename);
|
||||
}
|
||||
|
|
|
@ -628,7 +628,7 @@ gih_load_one_brush (GInputStream *input,
|
|||
layer_ID = gimp_layer_new (image_ID, name,
|
||||
bh.width, bh.height,
|
||||
image_type,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
g_free (name);
|
||||
|
||||
if (layer_ID != -1)
|
||||
|
|
|
@ -395,7 +395,7 @@ load_image (const gchar *filename,
|
|||
_("Background"),
|
||||
width, height,
|
||||
image_type,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
|
||||
|
||||
buffer = gimp_drawable_get_buffer (layer_ID);
|
||||
|
|
|
@ -441,7 +441,7 @@ load_image (GFile *file,
|
|||
|
||||
layer_ID = gimp_layer_new (image_ID, name, ph.width, ph.height,
|
||||
image_type,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
|
||||
|
||||
g_free (name);
|
||||
|
|
|
@ -444,14 +444,14 @@ load_image (const gchar *filename,
|
|||
image= gimp_image_new (width, height, GIMP_RGB);
|
||||
layer= gimp_layer_new (image, _("Background"), width, height,
|
||||
GIMP_RGB_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
}
|
||||
else
|
||||
{
|
||||
image= gimp_image_new (width, height, GIMP_INDEXED);
|
||||
layer= gimp_layer_new (image, _("Background"), width, height,
|
||||
GIMP_INDEXED_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
}
|
||||
|
||||
gimp_image_set_filename (image, filename);
|
||||
|
|
|
@ -400,7 +400,7 @@ load_image (GFile *file,
|
|||
layer_ID = gimp_layer_new (image_ID, _("Background"),
|
||||
width, height,
|
||||
gdtype,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
|
||||
|
||||
buffer = gimp_drawable_get_buffer (layer_ID);
|
||||
|
|
|
@ -1064,7 +1064,7 @@ load_image (const gchar *filename,
|
|||
|
||||
layer = gimp_layer_new (image, _("Background"), width, height,
|
||||
layer_type,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image, layer, -1, 0);
|
||||
|
||||
file_format = gimp_drawable_get_format (layer);
|
||||
|
|
|
@ -686,7 +686,7 @@ load_image (GFile *file,
|
|||
pnminfo->xres, pnminfo->yres,
|
||||
(pnminfo->np >= 3 ?
|
||||
GIMP_RGB_IMAGE : GIMP_GRAY_IMAGE),
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
|
||||
|
||||
buffer = gimp_drawable_get_buffer (layer_ID);
|
||||
|
|
|
@ -1915,7 +1915,7 @@ create_new_image (const gchar *filename,
|
|||
tmp = g_strdup_printf (_("Page %d"), pagenum);
|
||||
*layer_ID = gimp_layer_new (image_ID, tmp, width, height,
|
||||
gdtype,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
g_free (tmp);
|
||||
|
||||
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
|
||||
|
|
|
@ -1160,7 +1160,7 @@ load_image (const gchar *filename,
|
|||
layer_id = gimp_layer_new (data->image_id, _("Background"),
|
||||
runtime->image_width, runtime->image_height,
|
||||
ltype,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (data->image_id, layer_id, -1, 0);
|
||||
|
||||
data->buffer = gimp_drawable_get_buffer (layer_id);
|
||||
|
|
|
@ -1048,7 +1048,7 @@ create_new_image (const gchar *filename,
|
|||
|
||||
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
|
||||
gdtype,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
|
||||
|
||||
*buffer = gimp_drawable_get_buffer (*layer_ID);
|
||||
|
|
|
@ -347,7 +347,7 @@ load_image (const gchar *filename,
|
|||
load_vals.resolution, load_vals.resolution);
|
||||
|
||||
layer = gimp_layer_new_from_pixbuf (image, _("Rendered SVG"), pixbuf,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY,
|
||||
100, gimp_get_default_new_layer_mode (),
|
||||
0.0, 1.0);
|
||||
gimp_image_insert_layer (image, layer, -1, 0);
|
||||
|
||||
|
|
|
@ -1092,7 +1092,7 @@ ReadImage (FILE *fp,
|
|||
_("Background"),
|
||||
info->width, info->height,
|
||||
dtype,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
|
||||
|
||||
|
|
|
@ -998,7 +998,7 @@ load_image (const gchar *filename,
|
|||
_("Rendered WMF"),
|
||||
width, height,
|
||||
GIMP_RGBA_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
|
||||
buffer = gimp_drawable_get_buffer (layer);
|
||||
|
||||
|
|
|
@ -905,7 +905,7 @@ load_image (const gchar *filename,
|
|||
width, height,
|
||||
GIMP_INDEXED_IMAGE,
|
||||
100,
|
||||
GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
|
||||
|
||||
buffer = gimp_drawable_get_buffer (layer_ID);
|
||||
|
|
|
@ -728,7 +728,7 @@ load_image (const gchar *filename,
|
|||
|
||||
layer_ID = gimp_layer_new (image_ID, framename, width, height,
|
||||
GIMP_RGBA_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
|
||||
|
||||
/* Adjust layer position to let hotspot sit on the same point. */
|
||||
|
@ -952,7 +952,7 @@ load_thumbnail (const gchar *filename,
|
|||
|
||||
layer_ID = gimp_layer_new (image_ID, NULL, width, height,
|
||||
GIMP_RGBA_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
|
||||
|
||||
|
|
|
@ -482,7 +482,7 @@ parse_image (gint32 image_ID,
|
|||
xpm_image->height,
|
||||
GIMP_RGBA_IMAGE,
|
||||
100,
|
||||
GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
gimp_get_default_new_layer_mode ());
|
||||
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
|
||||
|
||||
|
|
|
@ -1272,7 +1272,7 @@ create_new_image (const gchar *filename,
|
|||
|
||||
*layer_ID = gimp_layer_new (image_ID, "Background", width, height,
|
||||
gdtype,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
|
||||
|
||||
*buffer = gimp_drawable_get_buffer (*layer_ID);
|
||||
|
|
|
@ -744,7 +744,7 @@ create_new_image (const gchar *filename,
|
|||
gimp_image_undo_disable (image_ID);
|
||||
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
|
||||
gdtype,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
|
||||
|
||||
if (drawable)
|
||||
|
|
|
@ -350,7 +350,7 @@ pluginCore (piArgs *argp)
|
|||
|
||||
nl = gimp_layer_new (argp->image, name, width, height,
|
||||
GIMP_RGBA_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
ndrw = gimp_drawable_get (nl);
|
||||
gimp_drawable_fill (nl, GIMP_FILL_TRANSPARENT);
|
||||
gimp_image_insert_layer (argp->image, nl, -1, 0);
|
||||
|
|
|
@ -258,7 +258,7 @@ smooth_palette (gint32 drawable_id,
|
|||
*layer_id = gimp_layer_new (new_image_id, _("Background"),
|
||||
config.width, config.height,
|
||||
gimp_drawable_type (drawable_id),
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
|
||||
gimp_image_insert_layer (new_image_id, *layer_id, -1, 0);
|
||||
|
||||
|
|
|
@ -354,7 +354,7 @@ tile (gint32 image_id,
|
|||
*new_layer_id = gimp_layer_new (*new_image_id, _("Background"),
|
||||
dst_width, dst_height,
|
||||
gimp_drawable_type (drawable_id),
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
|
||||
if (*new_layer_id == -1)
|
||||
return;
|
||||
|
|
|
@ -941,12 +941,12 @@ diff (GimpDrawable *drawable,
|
|||
xlayer_id = gimp_layer_new (new_image_id, "Warp_X_Vectors",
|
||||
width, height,
|
||||
GIMP_RGB_IMAGE,
|
||||
100.0, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100.0, gimp_get_default_new_layer_mode ());
|
||||
|
||||
ylayer_id = gimp_layer_new (new_image_id, "Warp_Y_Vectors",
|
||||
width, height,
|
||||
GIMP_RGB_IMAGE,
|
||||
100.0, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100.0, gimp_get_default_new_layer_mode ());
|
||||
|
||||
draw_yd = gimp_drawable_get (ylayer_id);
|
||||
draw_xd = gimp_drawable_get (xlayer_id);
|
||||
|
|
|
@ -192,7 +192,7 @@ run (const gchar *name,
|
|||
gimp_image_get_item_position (image_id,
|
||||
blur_id));
|
||||
gimp_layer_set_mode (scale_ids[id], GIMP_LAYER_MODE_GRAIN_MERGE);
|
||||
gimp_layer_set_mode (blur_id, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
gimp_layer_set_mode (blur_id, GIMP_LAYER_MODE_NORMAL);
|
||||
gimp_item_set_visible (scale_ids[id], FALSE);
|
||||
|
||||
gimp_image_remove_layer (image_id, original_id);
|
||||
|
|
|
@ -533,8 +533,9 @@ webpage_capture (void)
|
|||
image = gimp_image_new (width, height, GIMP_RGB);
|
||||
|
||||
gimp_image_undo_disable (image);
|
||||
layer = gimp_layer_new_from_pixbuf (image, _("Webpage"), webpagevals.pixbuf,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY,
|
||||
layer = gimp_layer_new_from_pixbuf (image, _("Webpage"),
|
||||
webpagevals.pixbuf,
|
||||
100, gimp_get_default_new_layer_mode (),
|
||||
0.0, 1.0);
|
||||
gimp_image_insert_layer (image, layer, -1, 0);
|
||||
gimp_image_undo_enable (image);
|
||||
|
|
|
@ -733,7 +733,7 @@ ReadImage (FILE *fd,
|
|||
image = gimp_image_new (width, height, base_type);
|
||||
layer = gimp_layer_new (image, _("Background"),
|
||||
width, height,
|
||||
image_type, 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
image_type, 100, gimp_get_default_new_layer_mode ());
|
||||
|
||||
gimp_image_set_filename (image, filename);
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ load_image (const gchar *filename,
|
|||
gimp_image_set_filename (image, filename);
|
||||
|
||||
layer = gimp_layer_new (image, _("Background"), width, height,
|
||||
layer_type, 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
layer_type, 100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image, layer, -1, 0);
|
||||
|
||||
buffer = gimp_drawable_get_buffer (layer);
|
||||
|
|
|
@ -526,7 +526,7 @@ emitgimp (gint hcol,
|
|||
hcol,
|
||||
row,
|
||||
GIMP_GRAY_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
|
||||
|
||||
buffer = gimp_drawable_get_buffer (layer_ID);
|
||||
|
|
|
@ -527,7 +527,7 @@ create_new_image (const gchar *filename,
|
|||
|
||||
gimp_image_undo_disable (image_ID);
|
||||
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
|
||||
dtype, 100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
dtype, 100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_ID, *layer_ID, -1, 0);
|
||||
|
||||
*buffer = gimp_drawable_get_buffer (*layer_ID);
|
||||
|
|
|
@ -565,7 +565,7 @@ load_image (const gchar *filename,
|
|||
layer_ID = gimp_layer_new (image_id, name_buf,
|
||||
fli_header.width, fli_header.height,
|
||||
GIMP_INDEXED_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
g_free (name_buf);
|
||||
|
||||
buffer = gimp_drawable_get_buffer (layer_ID);
|
||||
|
|
|
@ -288,7 +288,7 @@ ico_dialog_update_icon_preview (GtkWidget *dialog,
|
|||
|
||||
tmp_layer = gimp_layer_new (tmp_image, "temporary", w, h,
|
||||
gimp_drawable_type (layer),
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (tmp_image, tmp_layer, -1, 0);
|
||||
|
||||
buffer = gimp_drawable_get_buffer (layer);
|
||||
|
@ -388,7 +388,7 @@ ico_dialog_update_icon_preview (GtkWidget *dialog,
|
|||
|
||||
tmp_layer = gimp_layer_new (tmp_image, "temporary", w, h,
|
||||
gimp_drawable_type (layer),
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (tmp_image, tmp_layer, -1, 0);
|
||||
|
||||
buffer = gimp_drawable_get_buffer (layer);
|
||||
|
|
|
@ -634,7 +634,7 @@ ico_load_layer (FILE *fp,
|
|||
g_snprintf (name, sizeof (name), _("Icon #%i"), icon_num+1);
|
||||
layer = gimp_layer_new (image, name, width, height,
|
||||
GIMP_RGBA_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image, layer, -1, icon_num);
|
||||
|
||||
buffer = gimp_drawable_get_buffer (layer);
|
||||
|
|
|
@ -628,7 +628,7 @@ ico_image_get_reduced_buf (guint32 layer,
|
|||
|
||||
tmp_layer = gimp_layer_new (tmp_image, "tmp", w, h,
|
||||
gimp_drawable_type (layer),
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (tmp_image, tmp_layer, -1, 0);
|
||||
|
||||
tmp = gimp_drawable_get_buffer (tmp_layer);
|
||||
|
|
|
@ -232,7 +232,7 @@ load_image (const gchar *filename,
|
|||
cinfo.output_width,
|
||||
cinfo.output_height,
|
||||
layer_type,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
layer_ID = preview_layer_ID;
|
||||
}
|
||||
else
|
||||
|
@ -241,7 +241,7 @@ load_image (const gchar *filename,
|
|||
cinfo.output_width,
|
||||
cinfo.output_height,
|
||||
layer_type,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
}
|
||||
|
||||
if (! preview)
|
||||
|
|
|
@ -1034,7 +1034,7 @@ load_resource_1033 (const PSDimageres *res_a,
|
|||
cinfo.output_width,
|
||||
cinfo.output_height,
|
||||
GIMP_RGB_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
buffer = gimp_drawable_get_buffer (layer_id);
|
||||
format = babl_format ("R'G'B' u8");
|
||||
|
||||
|
|
|
@ -1435,7 +1435,7 @@ add_layers (gint32 image_id,
|
|||
layer_id = gimp_layer_new (image_id, lyr_a[lidx]->name,
|
||||
img_a->columns, img_a->rows,
|
||||
image_type,
|
||||
0, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
0, gimp_get_default_new_layer_mode ());
|
||||
g_free (lyr_a[lidx]->name);
|
||||
gimp_image_insert_layer (image_id, layer_id, parent_group_id, 0);
|
||||
gimp_drawable_fill (layer_id, GIMP_FILL_TRANSPARENT);
|
||||
|
@ -1791,7 +1791,7 @@ add_merged_image (gint32 image_id,
|
|||
layer_id = gimp_layer_new (image_id, _("Background"),
|
||||
img_a->columns, img_a->rows,
|
||||
image_type,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image_id, layer_id, -1, 0);
|
||||
buffer = gimp_drawable_get_buffer (layer_id);
|
||||
gegl_buffer_set (buffer,
|
||||
|
|
|
@ -410,7 +410,7 @@ load_image (const gchar *filename,
|
|||
|
||||
layer = gimp_layer_new (image, _("Background"), sgip->xsize, sgip->ysize,
|
||||
layer_type,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (image, layer, -1, 0);
|
||||
|
||||
/*
|
||||
|
|
|
@ -913,7 +913,7 @@ load_image (GFile *file,
|
|||
layer = gimp_layer_new (image, name,
|
||||
cols, rows,
|
||||
layer_type,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -927,7 +927,7 @@ load_image (GFile *file,
|
|||
layer = gimp_layer_new (image, name,
|
||||
cols, rows,
|
||||
layer_type,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
g_free (name);
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ create_layer (gint32 image_ID,
|
|||
width, height,
|
||||
GIMP_RGBA_IMAGE,
|
||||
100,
|
||||
GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
gimp_get_default_new_layer_mode ());
|
||||
|
||||
gimp_image_insert_layer (image_ID, layer_ID, -1, position);
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ gfig_dialog (void)
|
|||
newlayer = gimp_layer_new (gfig_context->image_id, "GFig",
|
||||
img_width, img_height,
|
||||
img_type,
|
||||
100.0, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100.0, gimp_get_default_new_layer_mode ());
|
||||
gimp_drawable_fill (newlayer, GIMP_FILL_TRANSPARENT);
|
||||
gimp_image_insert_layer (gfig_context->image_id, newlayer, -1, -1);
|
||||
gfig_context->drawable_id = newlayer;
|
||||
|
|
|
@ -55,7 +55,7 @@ compute_image (void)
|
|||
width, height,
|
||||
GIMP_RGBA_IMAGE,
|
||||
100.0,
|
||||
GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
gimp_get_default_new_layer_mode ());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ compute_image (void)
|
|||
width, height,
|
||||
GIMP_RGB_IMAGE,
|
||||
100.0,
|
||||
GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
gimp_get_default_new_layer_mode ());
|
||||
}
|
||||
|
||||
gimp_image_insert_layer (new_image_id, new_layer_id, -1, 0);
|
||||
|
|
|
@ -259,7 +259,7 @@ compute_image (void)
|
|||
GIMP_RGBA_IMAGE :
|
||||
GIMP_RGB_IMAGE,
|
||||
100.0,
|
||||
GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
gimp_get_default_new_layer_mode ());
|
||||
|
||||
insert_layer = TRUE;
|
||||
output_drawable = gimp_drawable_get (new_layer_id);
|
||||
|
|
|
@ -721,7 +721,7 @@ do_curl_effect (gint32 drawable_id)
|
|||
true_sel_height,
|
||||
color_image ?
|
||||
GIMP_RGBA_IMAGE : GIMP_GRAYA_IMAGE,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
|
||||
gimp_image_insert_layer (image_id, curl_layer_id,
|
||||
gimp_item_get_parent (drawable_id),
|
||||
|
|
|
@ -1913,7 +1913,7 @@ lay_init(PyGimpLayer *self, PyObject *args, PyObject *kwargs)
|
|||
unsigned int width, height;
|
||||
GimpImageType type = GIMP_RGB_IMAGE;
|
||||
double opacity = 100.0;
|
||||
GimpLayerMode mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
|
||||
GimpLayerMode mode = gimp_get_default_new_layer_mode ();
|
||||
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O!sii|idi:gimp.Layer.__init__",
|
||||
|
@ -2017,7 +2017,7 @@ pygimp_layer_new(gint32 ID)
|
|||
|
||||
#define GROUPLAYER_DOC "" \
|
||||
"gimp.GroupLayer(img, name="", opacity=100.0, " \
|
||||
"mode=gimp.LAYER_MODE_NORMAL_LEGACY)\n" \
|
||||
"mode=gimp.LAYER_MODE_NORMAL)\n" \
|
||||
"\n" \
|
||||
" Creates a new GroupLayer object that has to be \n" \
|
||||
"subsequently added to an image. Use Image.add_layer \n" \
|
||||
|
@ -2071,7 +2071,7 @@ grouplay_init(PyGimpLayer *self, PyObject *args, PyObject *kwargs)
|
|||
char *name = "Layer Group";
|
||||
GimpImageType type = GIMP_RGB_IMAGE;
|
||||
double opacity = 100.0;
|
||||
GimpLayerMode mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
|
||||
GimpLayerMode mode = gimp_get_default_new_layer_mode ();
|
||||
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O!|sdi:gimp.Layer.__init__",
|
||||
|
|
|
@ -131,7 +131,7 @@ img_new_layer(PyGimpImage *self, PyObject *args, PyObject *kwargs)
|
|||
gboolean alpha = TRUE;
|
||||
int pos = -1;
|
||||
double opacity = 100.0;
|
||||
GimpLayerMode mode = GIMP_LAYER_MODE_NORMAL_LEGACY;
|
||||
GimpLayerMode mode = gimp_get_default_new_layer_mode ();
|
||||
GimpFillType fill_mode = -1;
|
||||
|
||||
static char *kwlist[] = { "name", "width", "height", "offset_x", "offset_y",
|
||||
|
|
|
@ -257,7 +257,7 @@ sendBMPToGimp(HBITMAP hBMP, HDC hDC, RECT rect)
|
|||
layer_id = gimp_layer_new (new_image_id, _("Background"),
|
||||
ROUND4 (width), height,
|
||||
layerType,
|
||||
100, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100, gimp_get_default_new_layer_mode ());
|
||||
gimp_image_insert_layer (new_image_id, layer_id, -1, 0);
|
||||
|
||||
/* make rectangle */
|
||||
|
|
|
@ -465,7 +465,7 @@ add_cursor_image (gint32 image,
|
|||
layer = gimp_layer_new (image, _("Mouse Pointer"),
|
||||
cursor->width, cursor->height,
|
||||
GIMP_RGBA_IMAGE,
|
||||
100.0, GIMP_LAYER_MODE_NORMAL_LEGACY);
|
||||
100.0, gimp_get_default_new_layer_mode ());
|
||||
|
||||
buffer = gimp_drawable_get_buffer (layer);
|
||||
|
||||
|
|
Loading…
Reference in New Issue