Method

GimpGradientsegment_range_move

since: 2.2

Declaration [src]

gdouble
gimp_gradient_segment_range_move (
  GimpGradient* gradient,
  gint start_segment,
  gint end_segment,
  gdouble delta,
  gboolean control_compress
)

Description [src]

Move the position of an entire segment range by a delta.

Moves the position of an entire segment range by a delta. The actual delta (which is returned) will be limited by the control points of the neighboring segments. Returns the actual delta. Returns an error when a segment index is out of range, or gradient is not editable.

Available since: 2.2

Parameters

start_segment

Type: gint

Index of the first segment to operate on.

end_segment

Type: gint

Index of the last segment to operate on. If negative, the range will extend to the end segment.

delta

Type: gdouble

The delta to move the segment range.

control_compress

Type: gboolean

Whether or not to compress the neighboring segments.

Return value

Type: gdouble

The final delta by which the range moved.