boxGradient

Creates and returns a box gradient. Box gradient is a feathered rounded rectangle, it is useful for rendering drop shadows or highlights for boxes. Parameters (x, y) define the top-left corner of the rectangle, (w, h) define the size of the rectangle, r defines the corner radius, and f feather. Feather defines how blurry the border of the rectangle is. Parameter icol specifies the inner color and ocol the outer color of the gradient. The gradient is transformed by the current transform when it is passed to fillPaint or strokePaint.

  1. NVGPaint boxGradient(NVGContext ctx, float x, float y, float w, float h, float r, float f, Color icol, Color ocol)
  2. NVGPaint boxGradient(NVGContext ctx, float x, float y, float w, float h, float r, float f, NVGColor icol, NVGColor ocol)
    nothrow @trusted @nogc
    boxGradient
    ()
    (,
    float x
    ,
    float y
    ,
    float w
    ,
    float h
    ,
    float r
    ,
    float f
    ,
    const scope auto ref NVGColor icol
    ,
    const scope auto ref NVGColor ocol
    )

See Also

Suggestion Box / Bug Report