# Gimp.Gradient.prototype.segment_range_move

    function segment_range_move(start_segment: Number(gint), end_segment: Number(gint), delta: Number(gdouble), control_compress: Boolean): Number(gdouble) {
        // Gjs wrapper for gimp_gradient_segment_range_move()
    }

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.

Since 2.2

start_segment

  Index of the first segment to operate on.

end_segment

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

delta

  The delta to move the segment range.

control_compress

  Whether or not to compress the neighboring segments.

Returns

  The final delta by which the range moved.