Method

GimpItemtransform_2d

Declaration [src]

GimpItem*
gimp_item_transform_2d (
  GimpItem* item,
  gdouble source_x,
  gdouble source_y,
  gdouble scale_x,
  gdouble scale_y,
  gdouble angle,
  gdouble dest_x,
  gdouble dest_y
)

Description [src]

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().

Available since:2.8

Parameters

source_x gdouble
 

X coordinate of the transformation center.

source_y gdouble
 

Y coordinate of the transformation center.

scale_x gdouble
 

Amount to scale in x direction.

scale_y gdouble
 

Amount to scale in y direction.

angle gdouble
 

The angle of rotation (radians).

dest_x gdouble
 

X coordinate of where the center goes.

dest_y gdouble
 

Y coordinate of where the center goes.

Return value

Returns: GimpItem
 

The transformed item.

 The data is owned by the instance.