@buncanvas/core 0.1.6 → 0.2.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/index.d.ts +1 -1
- package/index.js +101 -49
- package/internal/ConstructEnforcer.d.ts +2 -0
- package/internal/symbols.d.ts +4 -0
- package/package.json +5 -4
- package/src/Canvas.d.ts +6 -6
- package/src/ImageData.d.ts +11 -4
- package/src/TextMetrics.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { Event } from "./src/Event";
|
|
|
5
5
|
export { MouseEvent } from "./src/MouseEvent";
|
|
6
6
|
export { WheelEvent } from "./src/WheelEvent";
|
|
7
7
|
export { KeyboardEvent } from "./src/KeyboardEvent";
|
|
8
|
-
export { Canvas } from "./src/Canvas";
|
|
8
|
+
export { Canvas, CanvasRenderingContext2D, CanvasGradient } from "./src/Canvas";
|
|
9
9
|
export { DOMMatrix } from "./dom/DOMMatrix";
|
|
10
10
|
export { Path2D } from "./src/Path2D";
|
|
11
11
|
export { Window, requestAnimationFrame } from "./src/Window";
|
package/index.js
CHANGED
|
@@ -324,6 +324,10 @@ var lib = dlopen(dlPath, {
|
|
|
324
324
|
args: ["ptr"],
|
|
325
325
|
returns: "void"
|
|
326
326
|
},
|
|
327
|
+
canvas_destroy_all: {
|
|
328
|
+
args: [],
|
|
329
|
+
returns: "void"
|
|
330
|
+
},
|
|
327
331
|
image_create: {
|
|
328
332
|
args: [],
|
|
329
333
|
returns: "ptr"
|
|
@@ -612,6 +616,12 @@ class FontFace {
|
|
|
612
616
|
}
|
|
613
617
|
}
|
|
614
618
|
}
|
|
619
|
+
// BunCanvas/internal/ConstructEnforcer.ts
|
|
620
|
+
var INTERNAL_TOKEN = Object.freeze({});
|
|
621
|
+
var throwIllegalConstructor = (object) => {
|
|
622
|
+
throw new TypeError(`Failed to construct '${object.constructor.name}': Illegal constructor`);
|
|
623
|
+
};
|
|
624
|
+
|
|
615
625
|
// BunCanvas/src/TextMetrics.ts
|
|
616
626
|
class TextMetrics {
|
|
617
627
|
width;
|
|
@@ -626,7 +636,9 @@ class TextMetrics {
|
|
|
626
636
|
alphabeticBaseline;
|
|
627
637
|
hangingBaseline;
|
|
628
638
|
ideographicBaseline;
|
|
629
|
-
constructor(width, actualBoundingBoxLeft, actualBoundingBoxRight, actualBoundingBoxAscent, actualBoundingBoxDescent, fontBoundingBoxAscent, fontBoundingBoxDescent, emHeightAscent, emHeightDescent, alphabeticBaseline, hangingBaseline, ideographicBaseline) {
|
|
639
|
+
constructor(token, width, actualBoundingBoxLeft, actualBoundingBoxRight, actualBoundingBoxAscent, actualBoundingBoxDescent, fontBoundingBoxAscent, fontBoundingBoxDescent, emHeightAscent, emHeightDescent, alphabeticBaseline, hangingBaseline, ideographicBaseline) {
|
|
640
|
+
if (token !== INTERNAL_TOKEN)
|
|
641
|
+
throwIllegalConstructor(this);
|
|
630
642
|
this.width = width;
|
|
631
643
|
this.actualBoundingBoxLeft = actualBoundingBoxLeft;
|
|
632
644
|
this.actualBoundingBoxRight = actualBoundingBoxRight;
|
|
@@ -1121,10 +1133,49 @@ class ImageData {
|
|
|
1121
1133
|
width;
|
|
1122
1134
|
height;
|
|
1123
1135
|
data;
|
|
1124
|
-
|
|
1136
|
+
colorSpace;
|
|
1137
|
+
constructor(arg1, arg2, arg3, arg4) {
|
|
1138
|
+
let data;
|
|
1139
|
+
let width;
|
|
1140
|
+
let height;
|
|
1141
|
+
let settings;
|
|
1142
|
+
if (arg1 instanceof Uint8ClampedArray) {
|
|
1143
|
+
data = arg1;
|
|
1144
|
+
width = arg2;
|
|
1145
|
+
if (typeof arg3 === "number") {
|
|
1146
|
+
height = arg3;
|
|
1147
|
+
settings = arg4;
|
|
1148
|
+
} else {
|
|
1149
|
+
settings = arg3;
|
|
1150
|
+
height = data.length / 4 / width;
|
|
1151
|
+
}
|
|
1152
|
+
if (data.length === 0 || data.length % 4 !== 0) {
|
|
1153
|
+
throw new SyntaxError("The input data array length must be a non-zero multiple of 4.");
|
|
1154
|
+
}
|
|
1155
|
+
if (width <= 0 || !Number.isInteger(width)) {
|
|
1156
|
+
throw new SyntaxError("Width must be a positive integer.");
|
|
1157
|
+
}
|
|
1158
|
+
if (height <= 0 || !Number.isInteger(height)) {
|
|
1159
|
+
throw new SyntaxError("Height must be a positive integer or derived from array length.");
|
|
1160
|
+
}
|
|
1161
|
+
if (data.length !== width * height * 4) {
|
|
1162
|
+
throw new SyntaxError("The input data array length does not match width * height * 4.");
|
|
1163
|
+
}
|
|
1164
|
+
} else if (typeof arg1 === "number" && typeof arg2 === "number") {
|
|
1165
|
+
width = arg1;
|
|
1166
|
+
height = arg2;
|
|
1167
|
+
settings = arg3;
|
|
1168
|
+
if (width <= 0 || !Number.isInteger(width) || height <= 0 || !Number.isInteger(height)) {
|
|
1169
|
+
throw new SyntaxError("Width and height must be positive integers.");
|
|
1170
|
+
}
|
|
1171
|
+
data = new Uint8ClampedArray(width * height * 4);
|
|
1172
|
+
} else {
|
|
1173
|
+
throw new TypeError("Failed to construct 'ImageData': Invalid arguments provided.");
|
|
1174
|
+
}
|
|
1125
1175
|
this.width = width;
|
|
1126
1176
|
this.height = height;
|
|
1127
1177
|
this.data = data;
|
|
1178
|
+
this.colorSpace = settings?.colorSpace ?? "srgb";
|
|
1128
1179
|
}
|
|
1129
1180
|
}
|
|
1130
1181
|
|
|
@@ -2221,7 +2272,6 @@ function isValidColor(str) {
|
|
|
2221
2272
|
var ptrs3 = new WeakMap;
|
|
2222
2273
|
var canvasFinalizationRegistry = new FinalizationRegistry((ptr) => {
|
|
2223
2274
|
lib.symbols.canvas_destroy(ptr);
|
|
2224
|
-
console.log("destroyed Canvas!");
|
|
2225
2275
|
});
|
|
2226
2276
|
class CanvasGradient {
|
|
2227
2277
|
type;
|
|
@@ -2229,28 +2279,30 @@ class CanvasGradient {
|
|
|
2229
2279
|
offsets = [];
|
|
2230
2280
|
colors = [];
|
|
2231
2281
|
constructor(...args) {
|
|
2232
|
-
|
|
2282
|
+
if (args[0] !== INTERNAL_TOKEN)
|
|
2283
|
+
throwIllegalConstructor(this);
|
|
2284
|
+
this.type = args[1];
|
|
2233
2285
|
switch (this.type) {
|
|
2234
2286
|
case 0 /* Linear */: {
|
|
2235
|
-
this.points[0] = args[
|
|
2236
|
-
this.points[1] = args[
|
|
2237
|
-
this.points[2] = args[
|
|
2238
|
-
this.points[3] = args[
|
|
2287
|
+
this.points[0] = args[2];
|
|
2288
|
+
this.points[1] = args[3];
|
|
2289
|
+
this.points[2] = args[4];
|
|
2290
|
+
this.points[3] = args[5];
|
|
2239
2291
|
break;
|
|
2240
2292
|
}
|
|
2241
2293
|
case 1 /* Radial */: {
|
|
2242
|
-
this.points[0] = args[
|
|
2243
|
-
this.points[1] = args[
|
|
2244
|
-
this.points[2] = args[
|
|
2245
|
-
this.points[3] = args[
|
|
2246
|
-
this.points[4] = args[
|
|
2247
|
-
this.points[5] = args[
|
|
2294
|
+
this.points[0] = args[2];
|
|
2295
|
+
this.points[1] = args[3];
|
|
2296
|
+
this.points[2] = args[4];
|
|
2297
|
+
this.points[3] = args[5];
|
|
2298
|
+
this.points[4] = args[6];
|
|
2299
|
+
this.points[5] = args[7];
|
|
2248
2300
|
break;
|
|
2249
2301
|
}
|
|
2250
2302
|
case 2 /* Conic */: {
|
|
2251
|
-
this.points[0] = args[
|
|
2252
|
-
this.points[1] = args[
|
|
2253
|
-
this.points[2] = args[
|
|
2303
|
+
this.points[0] = args[2];
|
|
2304
|
+
this.points[1] = args[3];
|
|
2305
|
+
this.points[2] = args[4];
|
|
2254
2306
|
break;
|
|
2255
2307
|
}
|
|
2256
2308
|
}
|
|
@@ -2266,6 +2318,21 @@ class CanvasGradient {
|
|
|
2266
2318
|
this.colors.splice(insertIdx, 0, encodeCString(color));
|
|
2267
2319
|
}
|
|
2268
2320
|
}
|
|
2321
|
+
{
|
|
2322
|
+
const proto = CanvasGradient.prototype;
|
|
2323
|
+
for (const key of Object.getOwnPropertyNames(proto)) {
|
|
2324
|
+
const desc = Object.getOwnPropertyDescriptor(proto, key);
|
|
2325
|
+
if (key == "constructor") {
|
|
2326
|
+
desc && (desc.value.toString = () => {
|
|
2327
|
+
return `function ${proto.constructor.name}() { [native code] }`;
|
|
2328
|
+
});
|
|
2329
|
+
continue;
|
|
2330
|
+
}
|
|
2331
|
+
if (typeof desc?.value === "function") {
|
|
2332
|
+
desc.value.toString = () => `function ${key}() { [native code] }`;
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2269
2336
|
|
|
2270
2337
|
class Render2DState {
|
|
2271
2338
|
lineWidth = 0;
|
|
@@ -2548,9 +2615,9 @@ class CanvasRenderingContext2D {
|
|
|
2548
2615
|
throw new TypeError("Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(Image or Canvas)'.");
|
|
2549
2616
|
}
|
|
2550
2617
|
getImageData(x, y, w, h) {
|
|
2551
|
-
const arr = new
|
|
2618
|
+
const arr = new Uint8ClampedArray(w * h * 4);
|
|
2552
2619
|
lib.symbols.canvas_get_image_data(ptrs3.get(this), x, y, w, h, ptr3(arr));
|
|
2553
|
-
return new ImageData(w, h
|
|
2620
|
+
return new ImageData(arr, w, h);
|
|
2554
2621
|
}
|
|
2555
2622
|
putImageData(data, dx, dy, dirtyX = 0, dirtyY = 0, dirtyWidth = data.width, dirtyHeight = data.height) {
|
|
2556
2623
|
if (!(data instanceof ImageData)) {
|
|
@@ -2577,17 +2644,17 @@ class CanvasRenderingContext2D {
|
|
|
2577
2644
|
createConicGradient(...args) {
|
|
2578
2645
|
if (args.length < 3)
|
|
2579
2646
|
throw new TypeError(`Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': 3 arguments required, but only ${args.length} present.`);
|
|
2580
|
-
return new CanvasGradient(2 /* Conic */, ...args);
|
|
2647
|
+
return new CanvasGradient(INTERNAL_TOKEN, 2 /* Conic */, ...args);
|
|
2581
2648
|
}
|
|
2582
2649
|
createLinearGradient(...args) {
|
|
2583
2650
|
if (args.length < 4)
|
|
2584
2651
|
throw new TypeError(`Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': 4 arguments required, but only ${args.length} present.`);
|
|
2585
|
-
return new CanvasGradient(0 /* Linear */, ...args);
|
|
2652
|
+
return new CanvasGradient(INTERNAL_TOKEN, 0 /* Linear */, ...args);
|
|
2586
2653
|
}
|
|
2587
2654
|
createRadialGradient(...args) {
|
|
2588
2655
|
if (args.length < 6)
|
|
2589
2656
|
throw new TypeError(`Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': 6 arguments required, but only ${args.length} present.`);
|
|
2590
|
-
return new CanvasGradient(1 /* Radial */, ...args);
|
|
2657
|
+
return new CanvasGradient(INTERNAL_TOKEN, 1 /* Radial */, ...args);
|
|
2591
2658
|
}
|
|
2592
2659
|
getTransform() {
|
|
2593
2660
|
let arr = new Float32Array(16);
|
|
@@ -2697,9 +2764,11 @@ class CanvasRenderingContext2D {
|
|
|
2697
2764
|
measureText(text) {
|
|
2698
2765
|
const pArr = new Float32Array(12);
|
|
2699
2766
|
lib.symbols.canvas_measure_text(ptrs3.get(this), encoder.encode(`${text}\x00`), ptr3(pArr));
|
|
2700
|
-
return new TextMetrics(pArr[0], pArr[1], pArr[2], pArr[3], pArr[4], pArr[5], pArr[6], pArr[7], pArr[8], pArr[9], pArr[10], pArr[11]);
|
|
2767
|
+
return new TextMetrics(INTERNAL_TOKEN, pArr[0], pArr[1], pArr[2], pArr[3], pArr[4], pArr[5], pArr[6], pArr[7], pArr[8], pArr[9], pArr[10], pArr[11]);
|
|
2701
2768
|
}
|
|
2702
|
-
constructor(iptr, cnv, args) {
|
|
2769
|
+
constructor(iptr, cnv, args, token) {
|
|
2770
|
+
if (token !== INTERNAL_TOKEN)
|
|
2771
|
+
throwIllegalConstructor(this);
|
|
2703
2772
|
const { desynchronized = false, alpha = true } = args ?? {};
|
|
2704
2773
|
const cb = new JSCallback(this.#reset.bind(this), {
|
|
2705
2774
|
args: [],
|
|
@@ -2760,7 +2829,7 @@ class Canvas {
|
|
|
2760
2829
|
}
|
|
2761
2830
|
getContext(contextType, args) {
|
|
2762
2831
|
if (contextType == "2d") {
|
|
2763
|
-
return new CanvasRenderingContext2D(ptrs3.get(this), this, args);
|
|
2832
|
+
return new CanvasRenderingContext2D(ptrs3.get(this), this, args, INTERNAL_TOKEN);
|
|
2764
2833
|
}
|
|
2765
2834
|
}
|
|
2766
2835
|
getBoundingClientRect() {
|
|
@@ -2959,29 +3028,6 @@ class Window {
|
|
|
2959
3028
|
item.cb(evt);
|
|
2960
3029
|
});
|
|
2961
3030
|
}
|
|
2962
|
-
if (this.#mMoveViewer[0] != 0) {
|
|
2963
|
-
this.#mMoveViewer[0] = 0;
|
|
2964
|
-
const evt = new MouseEvent("move", {
|
|
2965
|
-
target: this,
|
|
2966
|
-
altKey: false,
|
|
2967
|
-
button: 0,
|
|
2968
|
-
buttons: this.#mMoveViewer[5],
|
|
2969
|
-
clientX: this.#mMoveViewer[1],
|
|
2970
|
-
clientY: this.#mMoveViewer[2],
|
|
2971
|
-
movementX: this.#mMoveViewer[3],
|
|
2972
|
-
movementY: this.#mMoveViewer[4],
|
|
2973
|
-
ctrlKey: false,
|
|
2974
|
-
metaKey: false,
|
|
2975
|
-
screenX: 0,
|
|
2976
|
-
screenY: 0,
|
|
2977
|
-
shiftKey: false
|
|
2978
|
-
});
|
|
2979
|
-
if (this.onmousemove)
|
|
2980
|
-
this.onmousemove(evt);
|
|
2981
|
-
this.#mMoveEvts.forEach((item, key) => {
|
|
2982
|
-
item.cb(evt);
|
|
2983
|
-
});
|
|
2984
|
-
}
|
|
2985
3031
|
if (this.#mDownViewer[0] != 0) {
|
|
2986
3032
|
this.#mDownViewer[0] = 0;
|
|
2987
3033
|
const evt = new MouseEvent("down", {
|
|
@@ -3147,10 +3193,14 @@ class Window {
|
|
|
3147
3193
|
nativePath: dlPath
|
|
3148
3194
|
});
|
|
3149
3195
|
let pendingFrame = false;
|
|
3196
|
+
let shuttingDown = false;
|
|
3150
3197
|
let lastFrame = performance.now();
|
|
3151
3198
|
render_thread.onmessage = (msg) => {
|
|
3152
3199
|
const frameSignal = msg.data;
|
|
3153
3200
|
if (frameSignal == 2) {
|
|
3201
|
+
if (shuttingDown)
|
|
3202
|
+
return;
|
|
3203
|
+
shuttingDown = true;
|
|
3154
3204
|
lib.symbols.destroy_window();
|
|
3155
3205
|
lib.symbols.images_cleanup();
|
|
3156
3206
|
process.exit(0);
|
|
@@ -3169,7 +3219,6 @@ class Window {
|
|
|
3169
3219
|
}
|
|
3170
3220
|
if (!pendingFrame) {
|
|
3171
3221
|
pendingFrame = true;
|
|
3172
|
-
lib.symbols.canvas_flush_gpu();
|
|
3173
3222
|
setImmediate(() => {
|
|
3174
3223
|
const queueLen = requestedFrames.length;
|
|
3175
3224
|
if (queueLen > 0) {
|
|
@@ -3179,6 +3228,7 @@ class Window {
|
|
|
3179
3228
|
framesToProcess[i](now);
|
|
3180
3229
|
}
|
|
3181
3230
|
}
|
|
3231
|
+
lib.symbols.canvas_flush_gpu();
|
|
3182
3232
|
pendingFrame = false;
|
|
3183
3233
|
});
|
|
3184
3234
|
}
|
|
@@ -3358,6 +3408,8 @@ class Audio {
|
|
|
3358
3408
|
export {
|
|
3359
3409
|
Audio,
|
|
3360
3410
|
Canvas,
|
|
3411
|
+
CanvasGradient,
|
|
3412
|
+
CanvasRenderingContext2D,
|
|
3361
3413
|
DOMMatrix,
|
|
3362
3414
|
Event,
|
|
3363
3415
|
FontFace,
|
package/internal/symbols.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@buncanvas/core",
|
|
3
3
|
"module": "index.js",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.2.0",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
"typescript": "^7"
|
|
14
14
|
},
|
|
15
15
|
"optionalDependencies": {
|
|
16
|
-
"@buncanvas/native-linux-x64": "0.
|
|
17
|
-
"@buncanvas/native-win32-x64": "0.
|
|
18
|
-
"@buncanvas/native-darwin-x64": "0.
|
|
16
|
+
"@buncanvas/native-linux-x64": "0.2.0",
|
|
17
|
+
"@buncanvas/native-win32-x64": "0.2.0",
|
|
18
|
+
"@buncanvas/native-darwin-x64": "0.2.0"
|
|
19
19
|
},
|
|
20
20
|
"keywords": [
|
|
21
21
|
"canvas",
|
|
22
22
|
"gpu",
|
|
23
|
+
"vulkan",
|
|
23
24
|
"window",
|
|
24
25
|
"frontend",
|
|
25
26
|
"graphic",
|
package/src/Canvas.d.ts
CHANGED
|
@@ -9,17 +9,17 @@ declare enum GradientType {
|
|
|
9
9
|
Radial = 1,
|
|
10
10
|
Conic = 2
|
|
11
11
|
}
|
|
12
|
-
declare class CanvasGradient {
|
|
12
|
+
export declare class CanvasGradient {
|
|
13
13
|
type: GradientType;
|
|
14
14
|
points: Float32Array<ArrayBuffer>;
|
|
15
15
|
offsets: number[];
|
|
16
16
|
colors: Uint8Array[];
|
|
17
|
-
constructor(type: GradientType, a: number, x1: number, y1: number);
|
|
18
|
-
constructor(type: GradientType, x1: number, y1: number, x2: number, y2: number);
|
|
19
|
-
constructor(type: GradientType, x1: number, y1: number, x2: number, y2: number, r0: number, r1: number);
|
|
17
|
+
constructor(token: {}, type: GradientType, a: number, x1: number, y1: number);
|
|
18
|
+
constructor(token: {}, type: GradientType, x1: number, y1: number, x2: number, y2: number);
|
|
19
|
+
constructor(token: {}, type: GradientType, x1: number, y1: number, x2: number, y2: number, r0: number, r1: number);
|
|
20
20
|
addColorStop(offset: number, color: string): void;
|
|
21
21
|
}
|
|
22
|
-
declare class CanvasRenderingContext2D {
|
|
22
|
+
export declare class CanvasRenderingContext2D {
|
|
23
23
|
#private;
|
|
24
24
|
get canvas(): Canvas;
|
|
25
25
|
set font(css: string);
|
|
@@ -87,7 +87,7 @@ declare class CanvasRenderingContext2D {
|
|
|
87
87
|
set textBaseline(baseline: string);
|
|
88
88
|
set textAlign(alignment: string);
|
|
89
89
|
measureText(text: string): TextMetrics;
|
|
90
|
-
constructor(iptr: Pointer | null, cnv: Canvas, args: any);
|
|
90
|
+
constructor(iptr: Pointer | null, cnv: Canvas, args: any, token: {});
|
|
91
91
|
}
|
|
92
92
|
export declare class Canvas {
|
|
93
93
|
#private;
|
package/src/ImageData.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
type ImageDataOptions = {
|
|
2
|
+
colorSpace?: "srgb" | "display-p3";
|
|
3
|
+
pixelFormat?: "rgba-unorm8";
|
|
4
|
+
};
|
|
1
5
|
export declare class ImageData {
|
|
2
|
-
width: number;
|
|
3
|
-
height: number;
|
|
4
|
-
data:
|
|
5
|
-
|
|
6
|
+
readonly width: number;
|
|
7
|
+
readonly height: number;
|
|
8
|
+
readonly data: Uint8ClampedArray;
|
|
9
|
+
readonly colorSpace: "srgb" | "display-p3";
|
|
10
|
+
constructor(width: number, height: number, settings?: ImageDataOptions);
|
|
11
|
+
constructor(dataArray: Uint8ClampedArray, width: number, height?: number, settings?: ImageDataOptions);
|
|
6
12
|
}
|
|
13
|
+
export {};
|
package/src/TextMetrics.d.ts
CHANGED
|
@@ -11,5 +11,5 @@ export declare class TextMetrics {
|
|
|
11
11
|
readonly alphabeticBaseline: number;
|
|
12
12
|
readonly hangingBaseline: number;
|
|
13
13
|
readonly ideographicBaseline: number;
|
|
14
|
-
constructor(width: number, actualBoundingBoxLeft: number, actualBoundingBoxRight: number, actualBoundingBoxAscent: number, actualBoundingBoxDescent: number, fontBoundingBoxAscent: number, fontBoundingBoxDescent: number, emHeightAscent: number, emHeightDescent: number, alphabeticBaseline: number, hangingBaseline: number, ideographicBaseline: number);
|
|
14
|
+
constructor(token: {}, width: number, actualBoundingBoxLeft: number, actualBoundingBoxRight: number, actualBoundingBoxAscent: number, actualBoundingBoxDescent: number, fontBoundingBoxAscent: number, fontBoundingBoxDescent: number, emHeightAscent: number, emHeightDescent: number, alphabeticBaseline: number, hangingBaseline: number, ideographicBaseline: number);
|
|
15
15
|
}
|