transform_2d


Description:

[ Version ( since = "2.8" ) ]
public unowned Item transform_2d (double source_x, double source_y, double scale_x, double scale_y, double angle, double dest_x, double dest_y)

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: context_set_interpolation, context_set_transform_direction, context_set_transform_resize.

Parameters:

this

The affected item.

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.