The OpenD Programming Language

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)
    nothrow @trusted @nogc
    static if(NanoVegaHasArsdColor)
    boxGradient
    (,
    in float x
    ,
    in float y
    ,
    in float w
    ,
    in float h
    ,
    in float r
    ,
    in float f
    ,,)
  2. NVGPaint boxGradient(NVGContext ctx, float x, float y, float w, float h, float r, float f, NVGColor icol, NVGColor ocol)

See Also

Meta