Method

GimpGradientsegment_set_middle_pos

since: 2.2

Declaration [src]

gboolean
gimp_gradient_segment_set_middle_pos (
  GimpGradient* gradient,
  gint segment,
  gdouble pos,
  gdouble* final_pos
)

Description [src]

Sets the midpoint position of the segment

Sets the midpoint position of the segment of the gradient. The final position will be the given fraction between the two endpoints of the segment. Returns the final position. Returns an error when gradient is not editable or segment index is out of range.

Available since: 2.2

Parameters

segment

Type: gint

The index of a segment within the gradient.

pos

Type: gdouble

The position to set the guidepoint to.

final_pos

Type: gdouble*

The return position.

The argument will be set by the function.

Return value

Type: gboolean

TRUE on success.