pa_font 0.2.8 → 0.3.1
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.
- package/USAGE.md +45 -10
- package/dist/paFont.cjs +143 -15
- package/dist/paFont.cjs.map +1 -1
- package/dist/paFont.js +143 -15
- package/dist/paFont.js.map +1 -1
- package/paFont.d.ts +5 -0
- package/package.json +1 -1
package/paFont.d.ts
CHANGED
|
@@ -59,11 +59,13 @@ export interface ParagraphOptions extends TextOptions {
|
|
|
59
59
|
width?: number;
|
|
60
60
|
height?: number;
|
|
61
61
|
lineHeight?: number;
|
|
62
|
+
gap?: number;
|
|
62
63
|
align?: "left" | "center" | "right" | "justify";
|
|
63
64
|
whiteSpace?: "normal" | "pre-wrap" | "nowrap";
|
|
64
65
|
overflowWrap?: "normal" | "break-word" | "anywhere";
|
|
65
66
|
wordBreak?: "normal" | "break-all" | "keep-all";
|
|
66
67
|
overflow?: "visible" | "hidden";
|
|
68
|
+
overflowY?: "visible" | "hidden" | "scroll";
|
|
67
69
|
textOverflow?: "clip" | "ellipsis";
|
|
68
70
|
maxLines?: number;
|
|
69
71
|
ellipsis?: string | false;
|
|
@@ -129,6 +131,8 @@ export interface ParagraphMetrics {
|
|
|
129
131
|
y: number;
|
|
130
132
|
width: number;
|
|
131
133
|
height: number;
|
|
134
|
+
viewportHeight: number;
|
|
135
|
+
maxScrollTop: number;
|
|
132
136
|
lineCount: number;
|
|
133
137
|
bbox: Rect;
|
|
134
138
|
contentBox?: Rect;
|
|
@@ -150,6 +154,7 @@ export interface DrawTextOptions {
|
|
|
150
154
|
strokeStyle?: string | CanvasGradient | CanvasPattern;
|
|
151
155
|
fill?: boolean;
|
|
152
156
|
stroke?: boolean;
|
|
157
|
+
scrollTop?: number;
|
|
153
158
|
}
|
|
154
159
|
|
|
155
160
|
export class PAShape implements Iterable<Region> {
|