pa_font 0.2.2 → 0.2.4
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/README.md +0 -39
- package/USAGE.md +9 -0
- package/dist/paFont.cjs +212 -9
- package/dist/paFont.cjs.map +1 -1
- package/dist/paFont.js +212 -9
- package/dist/paFont.js.map +1 -1
- package/paFont.d.ts +8 -0
- package/package.json +1 -1
package/paFont.d.ts
CHANGED
|
@@ -87,6 +87,12 @@ export interface Region {
|
|
|
87
87
|
bbox: Rect;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
export interface RegionView {
|
|
91
|
+
readonly outer: readonly Point2D[];
|
|
92
|
+
readonly holes: readonly (readonly Point2D[])[];
|
|
93
|
+
readonly bbox: Rect;
|
|
94
|
+
}
|
|
95
|
+
|
|
90
96
|
export interface PointSample {
|
|
91
97
|
x: number;
|
|
92
98
|
y: number;
|
|
@@ -157,6 +163,7 @@ export class PAShape implements Iterable<Region> {
|
|
|
157
163
|
glyphs(): PAShape[];
|
|
158
164
|
toShape(options?: ShapeOptions): PAShape;
|
|
159
165
|
toRegions(options?: ShapeOptions): Region[];
|
|
166
|
+
toRegionViews(options?: ShapeOptions): RegionView[];
|
|
160
167
|
openHoles(width: number): PAShape;
|
|
161
168
|
resample(step: number): PAShape;
|
|
162
169
|
hit(x: number, y: number, epsilon?: number): HitResult;
|
|
@@ -176,6 +183,7 @@ export class paParagraph {
|
|
|
176
183
|
drawText(ctx: CanvasRenderingContext2D, options?: DrawTextOptions): void;
|
|
177
184
|
toShape(options?: ParagraphShapeOptions): PAShape;
|
|
178
185
|
toRegions(options?: ParagraphShapeOptions): Region[];
|
|
186
|
+
toRegionViews(options?: ParagraphShapeOptions): RegionView[];
|
|
179
187
|
toPoints(options?: ParagraphPointOptions): PointSample[];
|
|
180
188
|
}
|
|
181
189
|
|