| 123456789101112131415161718192021222324252627282930313233343536 |
- import { SColor } from "./";
- /**
- * 渐变颜色节点
- *
- * @author 庞利祥(sybotan@126.com)
- */
- export class SGradientStop {
- /** 位置 */
- private _pos: number = 0;
- get pos(): number {
- return this._pos;
- } // Get pos
- set pos(value: number) {
- if (value < 0) {
- value = 0;
- }
- if (value > 1) {
- value = 1;
- }
- this._pos = value;
- } // Set pos
- /** 颜色 */
- color: SColor;
- /**
- * 构造函数
- *
- * @param pos 节点位置
- * @param color 节点颜色
- */
- constructor(pos: number, color: SColor) {
- this.pos = pos;
- this.color = color;
- } // Constructor()
- } // Class SGradientStop
|