Gimp.Item.prototype.transform_2d

function transform_2d(source_x: Number(gdouble), source_y: Number(gdouble), scale_x: Number(gdouble), scale_y: Number(gdouble), angle: Number(gdouble), dest_x: Number(gdouble), dest_y: Number(gdouble)): Gimp.Item {
    // Gjs wrapper for gimp_item_transform_2d()
}
  

Transform the specified item in 2d.

This procedure transforms the specified item.

The transformation is done by scaling by the x and y scale factors about the point (source_x, source_y), then rotating around the same point, then translating that point to the new position (dest_x, dest_y).

If a selection exists and the item is a drawable, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then transformed as specified. The return value is the ID of the transformed floating selection.

If there is no selection or the item is not a drawable, the entire item will be transformed according to the specified parameters. The return value will be equal to the item ID supplied as input.

This procedure is affected by the following context setters: Gimp.context_set_interpolation, Gimp.context_set_transform_direction, Gimp.context_set_transform_resize.

Since 2.8

source_x

X coordinate of the transformation center.

source_y

Y coordinate of the transformation center.

scale_x

Amount to scale in x direction.

scale_y

Amount to scale in y direction.

angle

The angle of rotation (radians).

dest_x

X coordinate of where the center goes.

dest_y

Y coordinate of where the center goes.

Returns

The transformed item.