segment_range_move


Description:

[ Version ( since = "2.2" ) ]
public double segment_range_move (int start_segment, int end_segment, double delta, bool control_compress)

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.

Parameters:

this

The gradient.

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.