import { FontOptions, Graph, GraphOptions, IPoint, Point } from "./core"; export declare class TextOptions extends GraphOptions { content: Array; point?: Point; readonly href?: string; constructor(content?: string | Tspan | Array, point?: IPoint, href?: string); static wrap(options: string | Tspan | Array | TextOptions | { content: string | Tspan | Array; point?: IPoint; href?: string; }): TextOptions; } export default class Text extends Graph { readonly options: TextOptions; constructor(options?: string | Tspan | Array | TextOptions | { content: string | Tspan | Array; point?: IPoint; href?: string; }); point(point: IPoint): this; /** * 文字关联一个路径 * @param pathId * @param attrs textPath 支持的属性 */ href(pathId?: string, attrs?: any): this; /** * 设置文本偏移 相对于文本坐标点 * @param x x轴上面的偏移 * @example 12 整体x轴偏移12 '12 13' 第一个x偏移12 剩下的字x偏移13 * @param y y轴上面的偏移 * @example 12 整体y轴偏移12 '12 13' 第一个y偏移12 剩下的字y偏移13 */ offset(x: number | string, y?: number | string): this; offsetX(x: number | string): this; offsetY(y: number | string): this; font(options: FontOptions): this; text(text: string | Tspan | Array): this; tspan(text: string | Tspan, attrs?: any): this; anchor(anchor: 'start' | 'middle' | 'end'): this; /** * 使用文字锚点(text-anchor: middle)设置 * 文本相对于起点坐标居中 */ middle(): this; /** * 文字垂直显示 * 如果设置字体大小 则需要在之后调用该方法 * @size 每一行的字符个数 * @letterSpacing 每行字符的间隔空间 */ vertical(size?: number, letterSpacing?: number): this; protected attrs(): any; } export declare class TextPath extends Graph { readonly href: string; readonly text: string | Tspan | Array; constructor(href: string, text: string | Tspan | Array); protected attrs(): any; } export declare class Tspan extends Graph { readonly text: string; constructor(text: string); /** * 设置文本偏移 相对于文本坐标点 * @param x x轴上面的偏移 * @example 12 整体x轴偏移12 '12 13' 第一个x偏移12 剩下的字x偏移13 * @param y y轴上面的偏移 * @example 12 整体y轴偏移12 '12 13' 第一个y偏移12 剩下的字y偏移13 */ offset(x: number | string, y?: number | string): this; protected attrs(): any; static build(text: string): Tspan; } export declare class Link extends Graph { private href?; constructor(href: string, text: string | TextOptions); protected attrs(): any; }