Commit b80036e1 authored by Michael Natterer's avatar Michael Natterer 😴

pdb: deprecated gimp-layer-translate

and port all plug-ins/scripts to gimp-item-transform-translate.
parent acbdc4d5
......@@ -1752,11 +1752,13 @@ register_layer_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-layer-translate",
"Translate the layer by the specified offsets.",
"This procedure translates the layer by the amounts specified in the x and y arguments. These can be negative, and are considered offsets from the current position. This command only works if the layer has been added to an image. All additional layers contained in the image which have the linked flag set to TRUE w ill also be translated by the specified offsets.",
"This procedure translates the layer by the amounts specified in the x and y arguments. These can be negative, and are considered offsets from the current position. This command only works if the layer has been added to an image. All additional layers contained in the image which have the linked flag set to TRUE w ill also be translated by the specified offsets.\n"
"\n"
"Deprecated: Use 'gimp-item-transform-translate' instead.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
NULL);
"gimp-item-transform-translate");
gimp_procedure_add_argument (procedure,
gimp_param_spec_layer_id ("layer",
"layer",
......
......@@ -482,6 +482,8 @@ gimp_layer_resize_to_image_size (gint32 layer_ID)
* which have the linked flag set to TRUE w ill also be translated by
* the specified offsets.
*
* Deprecated: Use gimp_item_transform_translate() instead.
*
* Returns: TRUE on success.
**/
gboolean
......
......@@ -65,6 +65,7 @@ gboolean gimp_layer_resize (gint32
gint offx,
gint offy);
gboolean gimp_layer_resize_to_image_size (gint32 layer_ID);
GIMP_DEPRECATED_FOR(gimp_item_transform_translate)
gboolean gimp_layer_translate (gint32 layer_ID,
gint offx,
gint offy);
......
......@@ -613,6 +613,8 @@ HELP
&std_pdb_misc;
$deprecated = 'gimp-item-transform-translate';
@inargs = (
{ name => 'layer', type => 'layer',
desc => 'The layer' },
......
......@@ -1081,7 +1081,7 @@ do_optimizations (GimpRunMode run_mode,
bbox_bottom-bbox_top);
gimp_drawable_flush (drawable);
gimp_drawable_detach (drawable);
gimp_layer_translate (new_layer_id, bbox_left, bbox_top);
gimp_item_transform_translate (new_layer_id, bbox_left, bbox_top);
}
gimp_progress_update (((gdouble) this_frame_num + 1.0) /
......
......@@ -1092,7 +1092,7 @@ ReadImage (FILE *fd,
frame_number++;
gimp_image_insert_layer (*image_ID, layer_ID, -1, 0);
gimp_layer_translate (layer_ID, (gint) leftpos, (gint) toppos);
gimp_item_transform_translate (layer_ID, (gint) leftpos, (gint) toppos);
cur_progress = 0;
max_progress = height;
......
......@@ -739,9 +739,9 @@ load_image (const gchar *filename,
gimp_image_insert_layer (image_ID, layer_ID, -1, 0);
/* Adjust layer position to let hotspot sit on the same point. */
gimp_layer_translate (layer_ID,
xmcparas.x - imagesp->images[i]->xhot,
xmcparas.y - imagesp->images[i]->yhot);
gimp_item_transform_translate (layer_ID,
xmcparas.x - imagesp->images[i]->xhot,
xmcparas.y - imagesp->images[i]->yhot);
g_free (framename);
......
......@@ -1620,7 +1620,7 @@ lay_translate(PyGimpLayer *self, PyObject *args, PyObject *kwargs)
&offs_x, &offs_y))
return NULL;
if (!gimp_layer_translate(self->ID, offs_x, offs_y)) {
if (!gimp_item_transform_translate(self->ID, offs_x, offs_y)) {
PyErr_Format(pygimp_error,
"could not translate layer (ID %d) to offset %d, %d",
self->ID, offs_x, offs_y);
......
......@@ -141,7 +141,7 @@
(gimp-layer-set-mode cast-shadow-layer LAYER-MODE-MULTIPLY)
(gimp-layer-set-opacity cast-shadow-layer 75)
(plug-in-gauss-rle RUN-NONINTERACTIVE img cast-shadow-layer feather TRUE TRUE)
(gimp-layer-translate cast-shadow-layer offx offy)
(gimp-item-transform-translate cast-shadow-layer offx offy)
(set! csl-mask (car (gimp-layer-create-mask cast-shadow-layer ADD-MASK-BLACK)))
(gimp-layer-add-mask cast-shadow-layer csl-mask)
......
......@@ -52,7 +52,7 @@
; Offset the clouds layer
(if (gimp-item-is-layer drawable)
(gimp-layer-translate diff-clouds offset-x offset-y))
(gimp-item-transform-translate diff-clouds offset-x offset-y))
; Show the solid noise dialog
(plug-in-solid-noise SF-RUN-MODE image diff-clouds 0 0 0 1 4.0 4.0)
......
......@@ -145,7 +145,7 @@
shadow-blur
TRUE
TRUE))
(gimp-layer-translate shadow-layer shadow-transl-x shadow-transl-y)
(gimp-item-transform-translate shadow-layer shadow-transl-x shadow-transl-y)
(if (= from-selection TRUE)
(begin
......
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