pixi-silk 0.1.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,19 @@
1
+ # pixi-silk
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - First release. `SilkGraphics`: analytic anti-aliased rects, squircles, circles, ellipses, arcs, sectors,
8
+ lines, polylines (smoothed, tapered), paths, areas, hearts, stars, polygons and triangles, drawn as one
9
+ instanced draw call per object. Fill + stroke with exact coverage partition, shader-side dashes, gaussian
10
+ blur on any paint, energy-conserving hairlines, transform stack and CPU hit testing.
11
+ - Gradients: linear, radial, conic and along-the-path, interpolated in OKLab (or linear / sRGB), baked into a
12
+ half-float atlas and dithered at ±½ LSB.
13
+ - `createSilkApp`: a Pixi `Application` whose backing store maps 1:1 to device pixels (even at fractional
14
+ DPRs), follows DPR changes, keeps sub-pixel positions and makes filters inherit the screen resolution.
15
+ - Motion helpers: `damp`, `dampAngle`, `Spring`, `ease`.
16
+ - ESM only, built one file per module and free of side effects, so bundlers keep only what an app imports.
17
+ `SilkGraphics` with its shader is 14.8 kB gzipped and the motion helpers alone 0.4 kB. CommonJS code can
18
+ still `require()` the package on Node 20.19+ and 22.12+.
19
+ - Works in Safari: the gradient atlas is uploaded as the premultiplied data it is.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 pixi-silk contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,104 @@
1
+ # pixi-silk
2
+
3
+ **Smooth vector graphics for PixiJS v8.** pixi-silk draws shapes as exact signed distance fields.
4
+ Every edge is anti-aliased per pixel, so it stays smooth at any zoom, rotation and device pixel
5
+ ratio. No MSAA, no triangles, one draw call per object.
6
+
7
+ [Docs](https://pixi-silk.schmooky.dev/docs/) |
8
+ [API reference](https://pixi-silk.schmooky.dev/api/) |
9
+ [Lab](https://pixi-silk.schmooky.dev/lab/) |
10
+ [Showcase](https://pixi-silk.schmooky.dev/showcase/) |
11
+ [llms.txt](https://pixi-silk.schmooky.dev/llms.txt)
12
+
13
+ ```bash
14
+ npm install pixi-silk pixi.js
15
+ ```
16
+
17
+ ```ts
18
+ import { createSilkApp, SilkGraphics, conic, vertical } from 'pixi-silk';
19
+
20
+ const { app } = await createSilkApp({ parent: document.getElementById('stage')!, background: 0x000000 });
21
+
22
+ const g = new SilkGraphics()
23
+ .roundRect(10, 10, 340, 140, 22, 0.6).fill(0x1c1c1e) // squircle card
24
+ .arcSweep(80, 80, 44, -Math.PI / 2, Math.PI * 1.5)
25
+ .stroke({ width: 12, cap: 'round', gradient: conic([0x30d158, 0xffd60a, 0xff453a]) });
26
+
27
+ g.area([120, 100, 170, 80, 220, 92, 270, 60, 320, 70], 130, { smooth: 'monotone' })
28
+ .fill(vertical([[0, 0xff9f0a, 0.8], [1, 0xff9f0a, 0]]))
29
+ .stroke({ width: 2, color: 0xff9f0a, cap: 'round' }); // stroke right after fill = top line
30
+
31
+ app.stage.addChild(g);
32
+ ```
33
+
34
+ ## Why
35
+
36
+ PixiJS v8 turns `Graphics` into triangles when you draw. Scaled curves show facets. Thin lines
37
+ crawl between pixels. Anti-aliasing is MSAA on the main canvas only, so filters and render textures
38
+ stay aliased unless you opt each one in. Filters render at resolution 1, and 8-bit gradients band.
39
+
40
+ | | Pixi `Graphics` | `SilkGraphics` |
41
+ |---|---|---|
42
+ | Edges | triangles + optional MSAA | exact distance per pixel, 1-device-pixel filter |
43
+ | Zoom | facets appear | exact at any scale |
44
+ | Thin lines | break up below 1 px | keep 1 px and fade |
45
+ | Inside filters / render textures | aliased unless each target opts into MSAA | same quality everywhere |
46
+ | Gradients | sRGB, 8-bit | OKLab, half-float ramps, dithered |
47
+ | Draw calls | batched geometry | one instanced draw call per object |
48
+
49
+ ## Features
50
+
51
+ - **Shapes.** `rect`, `roundRect` with per-corner radii and squircle smoothing, `pill`, `circle`,
52
+ `ellipse`, `arc`, `arcSweep`, `sector` (donuts, gauges), `line` and `polyline`. Polylines can be
53
+ smoothed (monotone or Catmull-Rom), closed and tapered.
54
+ - **Paths and more.** `moveTo`, `lineTo`, `quadraticCurveTo`, `bezierCurveTo`, `area` for charts,
55
+ `heart`, `star`, `regularPoly` and rounded `triangle`.
56
+ - **Gradients.** `linear`, `vertical`, `horizontal`, `radial`, `conic` and `along`. They mix in OKLab
57
+ (or linear or sRGB), with easing and extend modes.
58
+ - **Paint.** A gaussian `blur` on any fill or stroke gives glows and soft shadows. Dashes and dots
59
+ are drawn in the shader. Strokes align inside, center or outside. Hairlines keep 1 pixel and fade.
60
+ - **Transforms.** `save`, `restore`, `translateTransform`, `rotateTransform`, `scaleTransform` and
61
+ `setTransform`. Rotated shapes stay exact.
62
+ - **Events.** `containsPoint` tests the real shapes. Rings are hollow and a line only reacts on its
63
+ stroke.
64
+ - **`createSilkApp`.** Maps canvas pixels 1:1 to device pixels, even at fractional ratios, and follows
65
+ DPR changes. No MSAA, filters at screen resolution, and pages still scroll on touch screens.
66
+ - **Motion.** Frame-rate independent `damp`, `dampAngle`, `Spring` and `ease`.
67
+ - **Performance.** 40 floats per primitive and one draw call per object. Rebuilding 50,000 primitives
68
+ takes about 12 ms of CPU per frame.
69
+
70
+ Requirements: `pixi.js` ^8.6 (peer dependency) and WebGL2. WebGPU is not supported yet.
71
+ Free-form paths are stroke-only, and joins are always round.
72
+
73
+ ## Documentation
74
+
75
+ - [Introduction](https://pixi-silk.schmooky.dev/docs/introduction/), [installation](https://pixi-silk.schmooky.dev/docs/installation/) and [quick start](https://pixi-silk.schmooky.dev/docs/quick-start/)
76
+ - Smooth graphics: [anti-aliasing in PixiJS v8 (MSAA vs SDF)](https://pixi-silk.schmooky.dev/docs/antialiasing-in-pixijs/), [fix jagged or blurry PixiJS graphics](https://pixi-silk.schmooky.dev/docs/smooth-graphics-pixijs/), [@pixi/graphics-smooth and PixiJS v8](https://pixi-silk.schmooky.dev/docs/graphics-smooth-v8/), [glossary](https://pixi-silk.schmooky.dev/docs/glossary/)
77
+ - Guides with live demos: [shapes](https://pixi-silk.schmooky.dev/docs/shapes/), [arcs & rings](https://pixi-silk.schmooky.dev/docs/arcs-and-rings/), [lines & paths](https://pixi-silk.schmooky.dev/docs/lines-and-paths/), [fills & strokes](https://pixi-silk.schmooky.dev/docs/fills-and-strokes/), [dashes](https://pixi-silk.schmooky.dev/docs/dashes/), [gradients](https://pixi-silk.schmooky.dev/docs/gradients/), [blur & shadows](https://pixi-silk.schmooky.dev/docs/blur-and-shadows/), [charts](https://pixi-silk.schmooky.dev/docs/charts/), [transforms](https://pixi-silk.schmooky.dev/docs/transforms/), [hit testing](https://pixi-silk.schmooky.dev/docs/hit-testing/), [animation](https://pixi-silk.schmooky.dev/docs/animation/), [resolution & DPR](https://pixi-silk.schmooky.dev/docs/resolution/), [performance](https://pixi-silk.schmooky.dev/docs/performance/)
78
+ - [How it works](https://pixi-silk.schmooky.dev/docs/how-it-works/), [Migrating from Graphics](https://pixi-silk.schmooky.dev/docs/migrating-from-graphics/) and the [FAQ](https://pixi-silk.schmooky.dev/faq/)
79
+ - [API reference](https://pixi-silk.schmooky.dev/api/), generated from the source JSDoc
80
+
81
+ ## Repository
82
+
83
+ A pnpm workspace:
84
+
85
+ | path | |
86
+ |---|---|
87
+ | `packages/pixi-silk` | the library, built by tsdown into ES modules (one file per module), tested with vitest |
88
+ | `apps/site` | docs site: Astro, React islands, MDX guides with live demos, TypeDoc API pages, lab, llms.txt |
89
+ | `scripts` | release helpers, page checks, screenshot and measurement tools |
90
+
91
+ ```bash
92
+ pnpm install
93
+ pnpm site:dev # docs + lab at http://localhost:5178
94
+ pnpm --filter pixi-silk test # unit tests
95
+ pnpm build # library build
96
+ pnpm site:build # static site + search index
97
+ ```
98
+
99
+ Releases use [changesets](.changeset/README.md) and npm trusted publishing. See
100
+ [CONTRIBUTING.md](CONTRIBUTING.md).
101
+
102
+ ## License
103
+
104
+ MIT
@@ -0,0 +1,243 @@
1
+ import { Gradient } from "./gradient.js";
2
+ import { PointsInput } from "./curves.js";
3
+ import { Bounds, Buffer, ColorSource, DestroyOptions, Geometry, Mesh, PointData, Shader } from "pixi.js";
4
+ //#region src/SilkGraphics.d.ts
5
+ /** How a fill is painted: a colour, a gradient, opacity and an optional gaussian blur for glows and soft shadows. */
6
+ export interface FillStyle {
7
+ /** Colour, any Pixi `ColorSource`. With a gradient, it tints the gradient. */
8
+ color?: ColorSource;
9
+ /** Opacity from 0 to 1. Default 1. */
10
+ alpha?: number;
11
+ /** Gradient paint. `color` (if given) tints it. */
12
+ gradient?: Gradient;
13
+ /** Gaussian blur radius (standard deviation, local units). Great for glows and soft shadows. */
14
+ blur?: number;
15
+ }
16
+ /** What `fill()` accepts: any Pixi colour, a gradient or a {@link FillStyle}. */
17
+ export type FillInput = ColorSource | Gradient | FillStyle;
18
+ /** Shape of the ends of open paths and of every dash: flat, round or square. */
19
+ export type LineCap = "butt" | "round" | "square";
20
+ /** How a stroke is painted: width (or tapered widths), alignment, caps, dashes, plus everything in {@link FillStyle}. */
21
+ export interface StrokeStyle extends FillStyle {
22
+ /**
23
+ * Default 1. On polylines an array tapers the stroke: `[start, end]` interpolates along the
24
+ * path length, one value per point sets each vertex.
25
+ */
26
+ width?: number | number[];
27
+ /** `inside` | `center` | `outside`, or Pixi's numeric alignment (1 inside, 0.5 center, 0 outside). */
28
+ alignment?: "inside" | "center" | "outside" | number;
29
+ /** Ends of open paths and of dashes. Default `butt` (Pixi default). */
30
+ cap?: LineCap;
31
+ /** `[dash, gap]` or a single number for equal dash and gap. A 0 dash with round caps gives dots. */
32
+ dash?: number | [number, number];
33
+ /** Shifts the dash pattern along the path, in local units. Default 0. */
34
+ dashOffset?: number;
35
+ /** On closed outlines stretch the pattern so it tiles without a seam. Default true. */
36
+ dashFit?: boolean;
37
+ /** Accepted for Pixi compatibility. Joins are always round, the smoothest choice. */
38
+ join?: "round" | "miter" | "bevel";
39
+ /** Accepted for Pixi compatibility and ignored. */
40
+ miterLimit?: number;
41
+ }
42
+ /** What `stroke()` accepts: any Pixi colour, a gradient or a {@link StrokeStyle}. */
43
+ export type StrokeInput = ColorSource | Gradient | StrokeStyle;
44
+ /** Options of `polyline()`: closed loops and monotone or Catmull-Rom smoothing of the points. */
45
+ export interface PolylineOptions {
46
+ /** Connect the last point back to the first. Default false. */
47
+ closed?: boolean;
48
+ /** Resample through a smooth curve. `monotone` never overshoots (charts), `catmull` for free paths. */
49
+ smooth?: false | "monotone" | "catmull";
50
+ /** Sample spacing for smoothing, local units. Default 2. */
51
+ step?: number;
52
+ }
53
+ /** Options of `area()`: monotone smoothing of the series and its sample spacing. */
54
+ export interface AreaOptions {
55
+ /** `monotone` draws a smooth curve through the points that never overshoots. Default false. */
56
+ smooth?: false | "monotone";
57
+ /** Sample spacing for smoothing, local units. Default 2. */
58
+ step?: number;
59
+ }
60
+ /** Per-object rendering settings of a {@link SilkGraphics}: dithering, anti-aliasing width and hairline threshold. */
61
+ export interface SilkGraphicsOptions {
62
+ /** Dither amplitude in 8-bit steps (0 disables). Applied to gradients and blurs only. Default 1. */
63
+ dither?: number;
64
+ /** AA ramp width in device pixels. 1 = crisp box filter. Default 1. */
65
+ aaWidth?: number;
66
+ /** Strokes thinner than this (device px) keep this width and fade instead. Default 1. */
67
+ minStrokePx?: number;
68
+ /** Pixi label of the object, for debugging. Default `SilkGraphics`. */
69
+ label?: string;
70
+ }
71
+ /**
72
+ * Geometry behind every {@link SilkGraphics}: one unit quad plus an interleaved instance buffer
73
+ * (40 floats per primitive). You rarely need it directly.
74
+ */
75
+ export declare class SilkGeometry extends Geometry {
76
+ /** Per-primitive data, grown on demand and reused across `clear()`. */
77
+ readonly instanceBuffer: Buffer;
78
+ /** Bounds of everything drawn, in local units (includes stroke widths and blur). */
79
+ readonly localBounds: Bounds;
80
+ constructor();
81
+ override get bounds(): Bounds;
82
+ }
83
+ /**
84
+ * A PixiJS display object with a `Graphics`-like API. Every primitive is a signed distance field
85
+ * evaluated per pixel, so edges are smooth at any scale, rotation and device pixel ratio. Each
86
+ * object is one instanced draw call.
87
+ *
88
+ * Shapes go on the active path and are painted by {@link SilkGraphics.fill | fill()} or
89
+ * {@link SilkGraphics.stroke | stroke()}. `stroke()` right after `fill()` paints the same shapes.
90
+ * Redrawing every frame is cheap, because {@link SilkGraphics.clear | clear()} keeps the buffers.
91
+ *
92
+ * @example
93
+ * ```ts
94
+ * const g = new SilkGraphics()
95
+ * .roundRect(0, 0, 160, 80, 20, 0.6).fill(0x1c1c1e)
96
+ * .arc(80, 40, 28, -Math.PI / 2, Math.PI).stroke({ width: 8, cap: 'round', color: 0x30d158 });
97
+ * app.stage.addChild(g);
98
+ * ```
99
+ */
100
+ export declare class SilkGraphics extends Mesh<SilkGeometry, Shader> {
101
+ /** Settings for new objects. Change them before you create any SilkGraphics. */
102
+ static defaults: Required<Omit<SilkGraphicsOptions, "label">>;
103
+ private _f;
104
+ private _count;
105
+ /** Shapes of the active path. fill() and stroke() consume them without clearing, like Pixi's GraphicsContext. */
106
+ private _pending;
107
+ private _consumed;
108
+ private _last;
109
+ /** Gradient ramps this graphics holds a reference to (key -> atlas row). */
110
+ private _rows;
111
+ private _cursor;
112
+ private _m;
113
+ private _mStack;
114
+ private readonly _box;
115
+ private readonly _silk;
116
+ private readonly _uniforms;
117
+ constructor(options?: SilkGraphicsOptions);
118
+ /** Number of primitives (= instances in the single draw call). */
119
+ get primitiveCount(): number;
120
+ /** Dither amplitude in 8-bit steps for gradients and blurs (0 disables). Default 1. */
121
+ get dither(): number;
122
+ /** Sets the dither amplitude of this object. */
123
+ set dither(v: number);
124
+ /** Width of the anti-aliasing ramp in device pixels. 1 is a crisp box filter, larger is softer. */
125
+ get aaWidth(): number;
126
+ /** Sets the anti-aliasing width of this object. */
127
+ set aaWidth(v: number);
128
+ /** Strokes thinner than this many device pixels keep this width and fade instead (hairlines). */
129
+ get minStrokePx(): number;
130
+ /** Sets the hairline threshold of this object. */
131
+ set minStrokePx(v: number);
132
+ private _setting;
133
+ /** Pushes the current transform (Pixi GraphicsContext API). */
134
+ save(): this;
135
+ /** Pops the transform pushed by the matching {@link SilkGraphics.save | save()}. */
136
+ restore(): this;
137
+ /** Resets the current transform to identity. */
138
+ resetTransform(): this;
139
+ /** Replaces the current transform with the matrix `[a c tx; b d ty]`. */
140
+ setTransform(a: number, b: number, c: number, d: number, tx: number, ty: number): this;
141
+ /** Moves the coordinate system. Shapes drawn next are offset by (x, y). */
142
+ translateTransform(x: number, y?: number): this;
143
+ /** Scales the coordinate system. Stroke widths, dashes and blur scale with its uniform part. */
144
+ scaleTransform(x: number, y?: number): this;
145
+ /** Rotates the coordinate system by `angle` radians (clockwise on screen). Rotated primitives stay exact. */
146
+ rotateTransform(angle: number): this;
147
+ private _x;
148
+ private _y;
149
+ private _pts;
150
+ /** Uniform scale of the current transform. */
151
+ private get _k();
152
+ private get _rot();
153
+ /** Maps an angle through the transform's linear part. */
154
+ private _angle;
155
+ private get _mirrored();
156
+ /** Axis-aligned rectangle (rotated by the current transform, if any). */
157
+ rect(x: number, y: number, w: number, h: number): this;
158
+ /**
159
+ * Rectangle with rounded corners. `smoothing` above 0 turns the corners into squircles.
160
+ *
161
+ * @param radius - one radius or `[topLeft, topRight, bottomRight, bottomLeft]`
162
+ * @param smoothing - 0..1 continuous-curvature ("squircle") corners, iOS uses about 0.6
163
+ */
164
+ roundRect(x: number, y: number, w: number, h: number, radius?: number | number[], smoothing?: number): this;
165
+ /** Rounded rect with fully round ends. */
166
+ pill(x: number, y: number, w: number, h: number): this;
167
+ /** Circle centred on (x, y). */
168
+ circle(x: number, y: number, radius: number): this;
169
+ /** Ellipse centred on (x, y) with an exact distance field (no polygon approximation). */
170
+ ellipse(x: number, y: number, rx: number, ry: number): this;
171
+ /** Open circular arc (stroke it). Angles work as in canvas. It starts its own subpath. */
172
+ arc(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): this;
173
+ /** Open arc given start angle and signed sweep (positive = clockwise on screen). */
174
+ arcSweep(cx: number, cy: number, radius: number, startAngle: number, sweep: number): this;
175
+ /**
176
+ * Closed annular sector: pie slices, donut segments, gauge segments.
177
+ * @param innerRadius - 0 for a pie slice
178
+ * @param cornerRadius - rounds all corners
179
+ */
180
+ sector(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, innerRadius?: number, cornerRadius?: number): this;
181
+ /** Heart icon centred at (cx, cy), `size` wide. `rounding` (0..0.3) puffs it up. */
182
+ heart(cx: number, cy: number, size: number, rounding?: number): this;
183
+ /** Star with `points` tips. `innerRadius` defaults to a classic star. */
184
+ star(cx: number, cy: number, points: number, radius: number, innerRadius?: number, rotation?: number, cornerRadius?: number): this;
185
+ /** Regular polygon (first vertex points up). */
186
+ regularPoly(cx: number, cy: number, radius: number, sides: number, rotation?: number, cornerRadius?: number): this;
187
+ /** Triangle through three points, with optionally rounded corners. */
188
+ triangle(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, cornerRadius?: number): this;
189
+ /** Straight line (stroke it). */
190
+ line(x0: number, y0: number, x1: number, y1: number): this;
191
+ /** Polyline through points (stroke it), optionally smoothed. */
192
+ polyline(points: PointsInput, options?: PolylineOptions): this;
193
+ /** Pixi-style polygon path. Only strokes are supported for arbitrary paths. */
194
+ poly(points: PointsInput, close?: boolean): this;
195
+ /**
196
+ * Area under a series. Fill it, then `stroke` draws the top line. Points must be sorted by x.
197
+ * @param lower - baseline y, or a second series with the same x values for bands
198
+ */
199
+ area(points: PointsInput, lower: number | PointsInput, options?: AreaOptions): this;
200
+ /** Starts a new, empty path (shapes drawn so far are kept). */
201
+ beginPath(): this;
202
+ /** Starts a new subpath at (x, y). Paths are stroke-only. */
203
+ moveTo(x: number, y: number): this;
204
+ /** Straight segment from the current point to (x, y). */
205
+ lineTo(x: number, y: number): this;
206
+ /** Quadratic Bezier to (x, y), flattened adaptively. */
207
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): this;
208
+ /** Cubic Bezier to (x, y), flattened adaptively. */
209
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): this;
210
+ /** Closes the current subpath back to its first point. */
211
+ closePath(): this;
212
+ private _pathShape;
213
+ private _currentSubpath;
214
+ /** Fills the shapes of the active path (Pixi semantics: `rect().circle().fill()` fills both). */
215
+ fill(style?: FillInput): this;
216
+ /** Strokes the shapes of the active path. Right after `fill()` it merges into the same instances. */
217
+ stroke(style?: StrokeInput): this;
218
+ /** Removes everything. Keeps the buffers for reuse, so redrawing every frame is cheap. */
219
+ clear(): this;
220
+ /**
221
+ * Hit test against the real shapes (local coordinates): rings are hollow, lines count only
222
+ * within their stroke. Used by Pixi's event system when `eventMode` is set.
223
+ */
224
+ override containsPoint(point: PointData): boolean;
225
+ override destroy(options?: DestroyOptions): void;
226
+ private _begin;
227
+ private _rewind;
228
+ private _releaseRamps;
229
+ private _alloc;
230
+ private _commit;
231
+ private _setBounds;
232
+ private _set4;
233
+ /** Premultiplied color. With a gradient paint it multiplies the ramp (white = untinted). */
234
+ private _premul;
235
+ /** Writes gradient geometry + atlas row. Returns flags to add. */
236
+ private _gradient;
237
+ private _frame;
238
+ private _emitClosed;
239
+ private _emitArc;
240
+ private _emitPath;
241
+ private _emitArea;
242
+ }
243
+ //#endregion