Method

GimpItemtransform_rotate

since: 2.8

Declaration [src]

GimpItem*
gimp_item_transform_rotate (
  GimpItem* item,
  gdouble angle,
  gboolean auto_center,
  gdouble center_x,
  gdouble center_y
)

Description [src]

Rotate the specified item about given coordinates through the specified angle.

This function rotates the specified item.

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 rotated by the specified amount. If auto_center is set to TRUE, the rotation is around the selection’s center. Otherwise, the coordinate of the center point needs to be specified. The return value is the ID of the rotated floating selection.

If there is no selection or the item is not a drawable, the entire item will be rotated around its center if auto_center is set to TRUE, otherwise the coordinate of the center point needs to be specified. 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

angle

Type: gdouble

The angle of rotation (radians).

auto_center

Type: gboolean

Whether to automatically rotate around the selection center.

center_x

Type: gdouble

The hor. coordinate of the center of rotation.

center_y

Type: gdouble

The vert. coordinate of the center of rotation.

Return value

Type: GimpItem

The rotated item.

The data is owned by the instance.