import { Border, Graph, GraphOptions, IPoint, Point } from "./core"; import Circle from "./circle"; export declare class LineOptions extends GraphOptions { readonly o1: Point; readonly o2: Point; /** * @param o1 线的起始坐标 * @param o2 第二坐标点 * @param options 线条设置 */ private constructor(); static build(o1: IPoint, o2: IPoint, options?: { border?: Border; color?: string; }): LineOptions; static horizontal(o1: IPoint, horizontal: number, options?: { border?: Border; color?: string; }): LineOptions; static vertical(o1: IPoint, vertical: number, options?: { border?: Border; color?: string; }): LineOptions; } /** * 连线 */ export default class Line extends Graph { readonly options: LineOptions; constructor(options: LineOptions); /** * 设置虚线 * @param dash * @param offset 偏移量 */ dash(dash: number | string, offset?: number): this; protected attrs(): any; /** * 绘制斜线 * @param o1 起始坐标点 * @param length 斜线长度 * @param degree 斜线角度 以垂直线朝上为0度 斜线跟垂直线的夹角 如:L 为90° */ static slash(o1: IPoint, length: number, degree: number): Line; static build(o1: IPoint, o2: IPoint, options?: { border?: Border; color?: string; }): Line; static horizontal(o: IPoint, horizontal: number, options?: { border?: Border; color?: string; }): Line; static vertical(o: IPoint, vertical: number, options?: { border?: Border; color?: string; }): Line; } /** * 定义只有直线组成的任意形状 */ export declare class Polyline extends Graph { readonly points: Point[]; /** * @param points 坐标点 * @param element 该参数无需传递 用于继承实现 */ constructor(points?: IPoint[], element?: SVGElement); /** * 配置多线段的顶点 * @param x 横坐标 * @param y 纵坐标 */ point(x: number | IPoint, y: number): this; /** * 绘制 多线段的顶点 * @param r * @param color 填充色 * @param attrs */ acme(r: number, color?: string, attrs?: any): Circle[]; /** * 设置虚线 * @param dash * @param offset 偏移量 */ dash(dash: number | string, offset?: number): this; protected attrs(): any; static build(points?: IPoint[]): Polyline; }