laymur 0.3.26 → 0.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,4 +16,5 @@ export interface UITextStyle {
|
|
|
16
16
|
strokeWidth: number;
|
|
17
17
|
}
|
|
18
18
|
export declare function isUITextStyle(obj: unknown): obj is UITextStyle;
|
|
19
|
+
export declare const DEFAULT_TEXT_STYLE: UITextStyle;
|
|
19
20
|
export declare function resolveTextStyle(style?: Partial<UITextStyle>, commonStyle?: Partial<UITextStyle>): UITextStyle;
|
|
@@ -5,7 +5,7 @@ export declare function measureTextChunk(context: OffscreenCanvasRenderingContex
|
|
|
5
5
|
export declare function buildLines(maxWidth: number, chunks: UITextChunk[]): UITextLine[];
|
|
6
6
|
export declare function calculateTextSize(lines: UITextLine[]): UITextSize;
|
|
7
7
|
export declare function renderText(x: number, y: number, text: string, style: UITextStyle, context: OffscreenCanvasRenderingContext2D): void;
|
|
8
|
-
export declare function renderTextLines(paddingTop: number, paddingLeft: number, lines: UITextLine[], context: OffscreenCanvasRenderingContext2D): void;
|
|
8
|
+
export declare function renderTextLines(paddingTop: number, paddingLeft: number, lines: UITextLine[], context: OffscreenCanvasRenderingContext2D, maxWidth: number): void;
|
|
9
9
|
export declare function calculateTextContentParameters(context: OffscreenCanvasRenderingContext2D, content: UITextContent, maxLineWidth: number, commonStyle?: Partial<UITextStyle>): {
|
|
10
10
|
lines: UITextLine[];
|
|
11
11
|
size: UITextSize;
|