import { Style } from 'ol/style';
import { Coordinate } from 'ol/coordinate';
import { BaseDrawing, DrawingConfig, DrawingStyleConfig } from './BaseDrawing';

/**
 * 线标绘样式配置
 */
export interface LineStyleConfig extends DrawingStyleConfig {
    lineColor?: string;
    lineWidth?: number;
    lineDash?: number[];
    lineCap?: "butt" | "round" | "square";
    lineJoin?: "bevel" | "round" | "miter";
    showArrow?: boolean;
    arrowSize?: number;
    arrowColor?: string;
    showStartPoint?: boolean;
    showEndPoint?: boolean;
    pointSize?: number;
    pointColor?: string;
    showLength?: boolean;
    lengthUnit?: "m" | "km" | "mi" | "ft";
    lengthPrecision?: number;
    imagePattern?: {
        src: string;
        scale?: number;
        spacing?: number;
        rotation?: number;
        opacity?: number;
    };
}
/**
 * 线标绘配置
 */
export interface LineDrawingConfig extends DrawingConfig {
    type: "line";
    coordinates: Coordinate[];
    style?: LineStyleConfig;
}
/**
 * 线标绘类
 * 支持各种线样式：实线、虚线、箭头、端点标记、长度标注等
 */
export declare class LineDrawing extends BaseDrawing<LineDrawingConfig, LineStyleConfig> {
    constructor(config: LineDrawingConfig);
    /**
     * 创建要素
     */
    protected createFeature(): void;
    /**
     * 创建样式
     */
    protected createStyle(): Style | Style[];
    /**
     * 创建主线样式
     */
    private createLineStyle;
    /**
     * 创建图片线样式（使用CanvasPattern优化版本）
     */
    private createImageLineStyles;
    /**
     * 创建fallback样式（当图片加载失败时使用）
     */
    private createFallbackStyle;
    /**
     * 创建箭头样式
     */
    private createArrowStyles;
    /**
     * 创建箭头图像
     */
    private createArrowImage;
    /**
     * 创建端点样式
     */
    private createPointStyles;
    /**
     * 创建长度标注样式
     */
    private createLengthStyle;
    /**
     * 创建文字样式
     */
    private createTextStyle;
    /**
     * 更新要素几何
     */
    protected updateFeatureGeometry(): void;
    /**
     * 创建选择样式
     */
    protected createSelectionStyles(): Style[];
    /**
     * 创建编辑控制点样式
     */
    private createEditHandleStyles;
    /**
     * 计算线长度
     */
    private calculateLength;
    /**
     * 格式化长度显示
     */
    private formatLength;
    /**
     * 设置坐标
     */
    setCoordinates(coordinates: Coordinate[]): void;
    /**
     * 获取坐标
     */
    getCoordinates(): Coordinate[];
    /**
     * 添加坐标点
     */
    addCoordinate(coordinate: Coordinate): void;
    /**
     * 插入坐标点
     */
    insertCoordinate(index: number, coordinate: Coordinate): void;
    /**
     * 移除坐标点
     */
    removeCoordinate(index: number): void;
    /**
     * 设置线样式
     */
    setLineStyle(options: {
        color?: string;
        width?: number;
        dash?: number[];
        cap?: "butt" | "round" | "square";
        join?: "bevel" | "round" | "miter";
    }): void;
    /**
     * 设置箭头
     */
    setArrow(show: boolean, options?: {
        size?: number;
        color?: string;
    }): void;
    /**
     * 设置端点显示
     */
    setEndPoints(showStart: boolean, showEnd: boolean, options?: {
        size?: number;
        color?: string;
    }): void;
    /**
     * 设置长度标注
     */
    setLengthLabel(show: boolean, options?: {
        unit?: "m" | "km" | "mi" | "ft";
        precision?: number;
    }): void;
    /**
     * 获取长度
     */
    getLength(unit?: "m" | "km" | "mi" | "ft"): number;
    /**
     * 创建实例
     */
    protected createInstance(config: LineDrawingConfig): BaseDrawing<LineDrawingConfig, LineStyleConfig>;
    /**
     * 从JSON反序列化
     */
    static fromJSON(data: any): LineDrawing;
    /**
     * 添加透明度到颜色
     */
    private addOpacityToColor;
}
/**
 * 线标绘工厂
 */
export declare class LineDrawingFactory {
    static create(config: LineDrawingConfig): LineDrawing;
    static getType(): string;
    static getSupportedTypes(): string[];
    /**
     * 创建预设样式的线
     */
    static createPreset(coordinates: Coordinate[], preset: "default" | "dashed" | "arrow" | "measured", options?: {
        name?: string;
        text?: string;
        color?: string;
        width?: number;
    }): LineDrawing;
}
//# sourceMappingURL=LineDrawing.d.ts.map