import { Property } from 'csstype'; import { Canvas } from '../canvas'; import { Point, Size } from '../math'; type ComputedParagraphStyle = { font: Property.Font; lineHeight: number; color: string; maxLines: number; textOverflow: string; textShadow?: Property.TextShadow; textAlign: Property.TextAlign; }; export declare class ParagraphStyle { static readonly defaultStyle: { readonly fontFamily: "Helvetica Neue,Arial,PingFang SC,Microsoft Yahei,Hiragino Sans GB,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji"; readonly fontSize: 16; readonly fontStyle: "normal"; readonly fontVariant: "normal"; readonly fontWeight: "normal"; readonly lineHeight: 24; readonly color: "#000"; readonly maxLines: 0; readonly textOverflow: "…"; readonly textAlign: "left"; }; fontStyle?: Property.FontStyle; fontVariant?: Property.FontVariant; fontWeight?: Property.FontWeight; fontStretch?: Property.FontStretch; fontSize?: number; lineHeight?: number; fontFamily?: Property.FontFamily; font?: Property.Font; color?: Property.Color; textShadow?: Property.TextShadow; maxLines?: number; textAlign?: Property.TextAlign; get computedStyle(): ComputedParagraphStyle; } export declare class ParagraphBuilder { private _style?; get style(): ParagraphStyle; private text; addText(text: string): void; build(): Paragraph; } export declare class Paragraph { readonly text: string; readonly computedStyle: ComputedParagraphStyle; size: Size; constructor(text: string, computedStyle: ComputedParagraphStyle); private tokens?; private lines; private maxWidth; private addLine; layout(maxWidth: number): void; paint(canvas: Canvas, offset: Point, maxLineWidth: number): void; } export {};