msdfgen-ts 0.3.0 → 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/dist/msdfgen-ts.iife.js +3 -3
- package/dist/msdfgen-ts.js +650 -623
- package/dist/types/shape/normalize.d.ts +11 -0
- package/package.json +1 -1
|
@@ -47,3 +47,14 @@ export declare function normalizeShape(shape: Shape): void;
|
|
|
47
47
|
* @param contours Contours of one even-odd path (mutated in place).
|
|
48
48
|
*/
|
|
49
49
|
export declare function orientContours(contours: Contour[]): void;
|
|
50
|
+
/**
|
|
51
|
+
* Winds the outer contours of one nonzero fill clockwise (y-up), as TrueType outlines and
|
|
52
|
+
* `orientContours` leave them, by reversing all of `contours` when its largest contour runs
|
|
53
|
+
* counter-clockwise. Holes keep their direction against the outer contours, so the fill does
|
|
54
|
+
* not change. What changes is that fills drawn in opposite directions no longer cancel out
|
|
55
|
+
* where they overlap once their contours are concatenated into one nonzero shape. The largest
|
|
56
|
+
* contour decides: a path that winds its own outer contours in both directions stays as it is.
|
|
57
|
+
*
|
|
58
|
+
* @param contours Contours of one nonzero fill (mutated in place).
|
|
59
|
+
*/
|
|
60
|
+
export declare function alignWinding(contours: Contour[]): void;
|