# Gimp.Drawable.prototype.edit_gradient_fill

    function edit_gradient_fill(gradient_type: Gimp.GradientType, offset: Number(gdouble), supersample: Boolean, supersample_max_depth: Number(gint), supersample_threshold: Number(gdouble), dither: Boolean, x1: Number(gdouble), y1: Number(gdouble), x2: Number(gdouble), y2: Number(gdouble)): Boolean {
        // Gjs wrapper for gimp_drawable_edit_gradient_fill()
    }

Draw a gradient between the starting and ending coordinates with the specified gradient type.

This tool requires information on the gradient type. It creates the specified variety of gradient using the starting and ending coordinates as defined for each gradient type. For shapeburst gradient types, the context's distance metric is also relevant and can be updated with Gimp.context_set_distance_metric.

This procedure is affected by the following context setters: Gimp.context_set_opacity, Gimp.context_set_paint_mode, Gimp.context_set_foreground, Gimp.context_set_background, Gimp.context_set_gradient and all gradient property settings, Gimp.context_set_distance_metric.

Since 2.10

gradient_type

  The type of gradient.

offset

  Offset relates to the starting and ending coordinates specified for the blend. This parameter is mode dependent.

supersample

  Do adaptive supersampling.

supersample_max_depth

  Maximum recursion levels for supersampling.

supersample_threshold

  Supersampling threshold.

dither

  Use dithering to reduce banding.

x1

  The x coordinate of this gradient's starting point.

y1

  The y coordinate of this gradient's starting point.

x2

  The x coordinate of this gradient's ending point.

y2

  The y coordinate of this gradient's ending point.

Returns

  TRUE on success.