You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
725 B
19 lines
725 B
// 本文件由FirstUI授权予内蒙古晟誉网络科技有限责任公司(手机号:1 514 82 2 8 108,身份证尾号:1R6T39)专用,请尊重知识产权,勿私下传播,违者追究法律责任。
|
|
class FillStyleLinearGradient {
|
|
|
|
constructor(x0, y0, x1, y1) {
|
|
this._start_pos = { _x: x0, _y: y0 };
|
|
this._end_pos = { _x: x1, _y: y1 };
|
|
this._stop_count = 0;
|
|
this._stops = [0, 0, 0, 0, 0];
|
|
}
|
|
|
|
addColorStop = function (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 FillStyleLinearGradient;
|