| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import { SGradient, SPoint } from "./";
- /**
- * 线性渐变
- *
- * @author 庞利祥(sybotan@126.com)
- */
- export class SLinearGradient extends SGradient {
- /**
- * 构造函数
- *
- * @param start 起点坐标
- * @param end 终点坐标
- */
- constructor(start: SPoint, end: SPoint);
- /**
- * 构造函数
- *
- * @param x1 起点X坐标
- * @param y1 起点Y坐标
- * @param x2 终点X坐标
- * @param y2 终点Y坐标
- */
- constructor(x1: number, y1: number, x2: number, y2: number);
- /**
- * 构造函数(重载实现)
- *
- * @param x1 起点X坐标
- * @param y1 起点Y坐标
- * @param x2 终点X坐标
- * @param y2 终点Y坐标
- */
- constructor(
- x1: number | SPoint,
- y1: number | SPoint,
- x2?: number,
- y2?: number
- ) {
- super();
- if (x1 instanceof SPoint && y1 instanceof SPoint) {
- this.start = new SPoint(x1);
- this.end = new SPoint(y1);
- } else {
- this.start = new SPoint(x1 as number, y1 as number);
- this.end = new SPoint(x2 as number, y2 as number);
- }
- } // Constructor()
- } // Class SGradientBrush
|