Gimp.paintbrush
Description: Reference for Gimp.paintbrush

### Function

# Gimppaintbrush

#### Declaration [src]

    gboolean
    gimp_paintbrush (
      GimpDrawable* drawable,
      gdouble fade_out,
      gsize num_strokes,
      const gdouble* strokes,
      GimpPaintApplicationMode method,
      gdouble gradient_length
    )

#### Description [src]

Paint in the current brush with optional fade out parameter and pull colors from a gradient.

This tool is the standard paintbrush. It draws linearly interpolated lines through the specified stroke coordinates. It operates on the specified drawable in the foreground color with the active brush. The ‘fade-out’ parameter is measured in pixels and allows the brush stroke to linearly fall off. The pressure is set to the maximum at the beginning of the stroke. As the distance of the stroke nears the fade-out value, the pressure will approach zero. The gradient-length is the distance to spread the gradient over. It is measured in pixels. If the gradient-length is 0, no gradient is used.

#### Parameters

`drawable`

  Type: `GimpDrawable`

  The affected drawable.

  The data is owned by the caller of the function.

`fade_out`

  Type: `gdouble`

  Fade out parameter.

`num_strokes`

  Type: `gsize`

  Number of stroke control points (count each coordinate as 2 points).

`strokes`

  Type: An array of `double`

  Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, …, sn.x, sn.y }.

  The length of the array is specified in the `num_strokes` argument.
  The data is owned by the caller of the function.

`method`

  Type: `GimpPaintApplicationMode`

  The paint method to use.

`gradient_length`

  Type: `gdouble`

  Length of gradient to draw.

#### Return value

Type: `gboolean`

TRUE on success.