linearGradient

Creates and returns a linear gradient with middle stop. Parameters (sx, sy) (ex, ey) specify the start and end coordinates of the linear gradient, icol specifies the start color, midp specifies stop point in range (0..1), and ocol the end color. The gradient is transformed by the current transform when it is passed to fillPaint or strokePaint.

  1. NVGPaint linearGradient(NVGContext ctx, float sx, float sy, float ex, float ey, Color icol, Color ocol)
  2. NVGPaint linearGradient(NVGContext ctx, float sx, float sy, float ex, float ey, Color icol, float midp, Color mcol, Color ocol)
  3. NVGPaint linearGradient(NVGContext ctx, float sx, float sy, float ex, float ey, NVGColor icol, NVGColor ocol)
  4. NVGPaint linearGradient(NVGContext ctx, float sx, float sy, float ex, float ey, NVGColor icol, float midp, NVGColor mcol, NVGColor ocol)
    nothrow @trusted @nogc
    linearGradient
    ()
    (,
    float sx
    ,
    float sy
    ,
    float ex
    ,
    float ey
    ,
    const scope auto ref NVGColor icol
    ,
    in float midp
    ,
    const scope auto ref NVGColor mcol
    ,
    const scope auto ref NVGColor ocol
    )

See Also

Meta