Method

GimpDrawableedit_gradient_fill

Declaration [src]

gboolean
gimp_drawable_edit_gradient_fill (
  GimpDrawable* drawable,
  GimpGradientType gradient_type,
  gdouble offset,
  gboolean supersample,
  gint supersample_max_depth,
  gdouble supersample_threshold,
  gboolean dither,
  gdouble x1,
  gdouble y1,
  gdouble x2,
  gdouble y2
)

Description [src]

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().

Available since:2.10

Parameters

gradient_type GimpGradientType
 

The type of gradient.

offset gdouble
 

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

supersample gboolean
 

Do adaptive supersampling.

supersample_max_depth gint
 

Maximum recursion levels for supersampling.

supersample_threshold gdouble
 

Supersampling threshold.

dither gboolean
 

Use dithering to reduce banding.

x1 gdouble
 

The x coordinate of this gradient’s starting point.

y1 gdouble
 

The y coordinate of this gradient’s starting point.

x2 gdouble
 

The x coordinate of this gradient’s ending point.

y2 gdouble
 

The y coordinate of this gradient’s ending point.

Return value

Returns: gboolean
 

TRUE on success.