# Gimp.Item.prototype.transform_shear

    function transform_shear(shear_type: Gimp.OrientationType, magnitude: Number(gdouble)): Gimp.Item {
        // Gjs wrapper for gimp_item_transform_shear()
    }

Shear the specified item about its center by the specified magnitude.

This procedure shears the specified item.

The shear type parameter indicates whether the shear will be applied horizontally or vertically. The magnitude can be either positive or negative and indicates the extent (in pixels) to shear by.

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 sheared as specified. The return value is the ID of the sheared floating selection.

If there is no selection or the item is not a drawable, the entire item will be sheared 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

shear_type

  Type of shear.

magnitude

  The magnitude of the shear.

Returns

  The sheared item.