UNPKG

@wanghonggan/uv-ui

Version:

uv-ui 破釜沉舟之兼容vue3+2、nvue、app、h5、小程序等多端基于uni-app和uView2.x的生态框架,支持单独导入,开箱即用,利剑出击。

17 lines (15 loc) 531 B
class FillStyleRadialGradient { constructor(x0, y0, r0, x1, y1, r1) { this._start_pos = { _x: x0, _y: y0, _r: r0 }; this._end_pos = { _x: x1, _y: y1, _r: r1 }; this._stop_count = 0; this._stops = [0, 0, 0, 0, 0]; } addColorStop(pos, color) { if (this._stop_count < 5 && 0.0 <= pos && pos <= 1.0) { this._stops[this._stop_count] = { _pos: pos, _color: color }; this._stop_count++; } } } export default FillStyleRadialGradient;