emf-converter 4.25.2 → 4.25.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/dist/browser.js +5 -4
- package/dist/browser.mjs +5 -4
- package/dist/index.js +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -20203,6 +20203,7 @@ function computeSurfaceSize(width, height, maxWidth, maxHeight, dpiScale = DEFAU
|
|
|
20203
20203
|
}
|
|
20204
20204
|
return { w: clampedW, h: clampedH, scaleX, scaleY };
|
|
20205
20205
|
}
|
|
20206
|
+
var READBACK = { willReadFrequently: true };
|
|
20206
20207
|
function createCanvas(width, height, maxWidth, maxHeight, dpiScale = DEFAULT_DPI_SCALE, maxCanvasDimension = MAX_CANVAS_DIMENSION) {
|
|
20207
20208
|
const { w, h, scaleX, scaleY } = computeSurfaceSize(width, height, maxWidth, maxHeight, dpiScale, maxCanvasDimension);
|
|
20208
20209
|
try {
|
|
@@ -20216,7 +20217,7 @@ function createCanvas(width, height, maxWidth, maxHeight, dpiScale = DEFAULT_DPI
|
|
|
20216
20217
|
`createCanvas: using OffscreenCanvas ${w}\xD7${h}, scale=(${scaleX.toFixed(3)},${scaleY.toFixed(3)})`
|
|
20217
20218
|
);
|
|
20218
20219
|
const canvas = new OffscreenCanvas(w, h);
|
|
20219
|
-
const ctx = canvas.getContext("2d");
|
|
20220
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20220
20221
|
if (!ctx) {
|
|
20221
20222
|
emfWarn('createCanvas: OffscreenCanvas.getContext("2d") returned null');
|
|
20222
20223
|
return null;
|
|
@@ -20230,7 +20231,7 @@ function createCanvas(width, height, maxWidth, maxHeight, dpiScale = DEFAULT_DPI
|
|
|
20230
20231
|
const canvas = document.createElement("canvas");
|
|
20231
20232
|
canvas.width = w;
|
|
20232
20233
|
canvas.height = h;
|
|
20233
|
-
const ctx = canvas.getContext("2d");
|
|
20234
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20234
20235
|
if (!ctx) {
|
|
20235
20236
|
emfWarn('createCanvas: HTMLCanvasElement.getContext("2d") returned null');
|
|
20236
20237
|
return null;
|
|
@@ -20265,7 +20266,7 @@ function createTempCanvas(width, height) {
|
|
|
20265
20266
|
height = Math.max(1, Math.min(Math.floor(height), MAX_CANVAS_DIMENSION));
|
|
20266
20267
|
if (typeof OffscreenCanvas !== "undefined") {
|
|
20267
20268
|
const canvas = new OffscreenCanvas(width, height);
|
|
20268
|
-
const ctx = canvas.getContext("2d");
|
|
20269
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20269
20270
|
if (!ctx) {
|
|
20270
20271
|
return null;
|
|
20271
20272
|
}
|
|
@@ -20275,7 +20276,7 @@ function createTempCanvas(width, height) {
|
|
|
20275
20276
|
const canvas = document.createElement("canvas");
|
|
20276
20277
|
canvas.width = width;
|
|
20277
20278
|
canvas.height = height;
|
|
20278
|
-
const ctx = canvas.getContext("2d");
|
|
20279
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20279
20280
|
if (!ctx) {
|
|
20280
20281
|
return null;
|
|
20281
20282
|
}
|
package/dist/browser.mjs
CHANGED
|
@@ -20201,6 +20201,7 @@ function computeSurfaceSize(width, height, maxWidth, maxHeight, dpiScale = DEFAU
|
|
|
20201
20201
|
}
|
|
20202
20202
|
return { w: clampedW, h: clampedH, scaleX, scaleY };
|
|
20203
20203
|
}
|
|
20204
|
+
var READBACK = { willReadFrequently: true };
|
|
20204
20205
|
function createCanvas(width, height, maxWidth, maxHeight, dpiScale = DEFAULT_DPI_SCALE, maxCanvasDimension = MAX_CANVAS_DIMENSION) {
|
|
20205
20206
|
const { w, h, scaleX, scaleY } = computeSurfaceSize(width, height, maxWidth, maxHeight, dpiScale, maxCanvasDimension);
|
|
20206
20207
|
try {
|
|
@@ -20214,7 +20215,7 @@ function createCanvas(width, height, maxWidth, maxHeight, dpiScale = DEFAULT_DPI
|
|
|
20214
20215
|
`createCanvas: using OffscreenCanvas ${w}\xD7${h}, scale=(${scaleX.toFixed(3)},${scaleY.toFixed(3)})`
|
|
20215
20216
|
);
|
|
20216
20217
|
const canvas = new OffscreenCanvas(w, h);
|
|
20217
|
-
const ctx = canvas.getContext("2d");
|
|
20218
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20218
20219
|
if (!ctx) {
|
|
20219
20220
|
emfWarn('createCanvas: OffscreenCanvas.getContext("2d") returned null');
|
|
20220
20221
|
return null;
|
|
@@ -20228,7 +20229,7 @@ function createCanvas(width, height, maxWidth, maxHeight, dpiScale = DEFAULT_DPI
|
|
|
20228
20229
|
const canvas = document.createElement("canvas");
|
|
20229
20230
|
canvas.width = w;
|
|
20230
20231
|
canvas.height = h;
|
|
20231
|
-
const ctx = canvas.getContext("2d");
|
|
20232
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20232
20233
|
if (!ctx) {
|
|
20233
20234
|
emfWarn('createCanvas: HTMLCanvasElement.getContext("2d") returned null');
|
|
20234
20235
|
return null;
|
|
@@ -20263,7 +20264,7 @@ function createTempCanvas(width, height) {
|
|
|
20263
20264
|
height = Math.max(1, Math.min(Math.floor(height), MAX_CANVAS_DIMENSION));
|
|
20264
20265
|
if (typeof OffscreenCanvas !== "undefined") {
|
|
20265
20266
|
const canvas = new OffscreenCanvas(width, height);
|
|
20266
|
-
const ctx = canvas.getContext("2d");
|
|
20267
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20267
20268
|
if (!ctx) {
|
|
20268
20269
|
return null;
|
|
20269
20270
|
}
|
|
@@ -20273,7 +20274,7 @@ function createTempCanvas(width, height) {
|
|
|
20273
20274
|
const canvas = document.createElement("canvas");
|
|
20274
20275
|
canvas.width = width;
|
|
20275
20276
|
canvas.height = height;
|
|
20276
|
-
const ctx = canvas.getContext("2d");
|
|
20277
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20277
20278
|
if (!ctx) {
|
|
20278
20279
|
return null;
|
|
20279
20280
|
}
|
package/dist/index.js
CHANGED
|
@@ -20204,6 +20204,7 @@ function computeSurfaceSize(width, height, maxWidth, maxHeight, dpiScale = DEFAU
|
|
|
20204
20204
|
}
|
|
20205
20205
|
return { w: clampedW, h: clampedH, scaleX, scaleY };
|
|
20206
20206
|
}
|
|
20207
|
+
var READBACK = { willReadFrequently: true };
|
|
20207
20208
|
function createCanvas(width, height, maxWidth, maxHeight, dpiScale = DEFAULT_DPI_SCALE, maxCanvasDimension = MAX_CANVAS_DIMENSION) {
|
|
20208
20209
|
const { w, h, scaleX, scaleY } = computeSurfaceSize(width, height, maxWidth, maxHeight, dpiScale, maxCanvasDimension);
|
|
20209
20210
|
try {
|
|
@@ -20217,7 +20218,7 @@ function createCanvas(width, height, maxWidth, maxHeight, dpiScale = DEFAULT_DPI
|
|
|
20217
20218
|
`createCanvas: using OffscreenCanvas ${w}\xD7${h}, scale=(${scaleX.toFixed(3)},${scaleY.toFixed(3)})`
|
|
20218
20219
|
);
|
|
20219
20220
|
const canvas = new OffscreenCanvas(w, h);
|
|
20220
|
-
const ctx = canvas.getContext("2d");
|
|
20221
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20221
20222
|
if (!ctx) {
|
|
20222
20223
|
emfWarn('createCanvas: OffscreenCanvas.getContext("2d") returned null');
|
|
20223
20224
|
return null;
|
|
@@ -20231,7 +20232,7 @@ function createCanvas(width, height, maxWidth, maxHeight, dpiScale = DEFAULT_DPI
|
|
|
20231
20232
|
const canvas = document.createElement("canvas");
|
|
20232
20233
|
canvas.width = w;
|
|
20233
20234
|
canvas.height = h;
|
|
20234
|
-
const ctx = canvas.getContext("2d");
|
|
20235
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20235
20236
|
if (!ctx) {
|
|
20236
20237
|
emfWarn('createCanvas: HTMLCanvasElement.getContext("2d") returned null');
|
|
20237
20238
|
return null;
|
|
@@ -20266,7 +20267,7 @@ function createTempCanvas(width, height) {
|
|
|
20266
20267
|
height = Math.max(1, Math.min(Math.floor(height), MAX_CANVAS_DIMENSION));
|
|
20267
20268
|
if (typeof OffscreenCanvas !== "undefined") {
|
|
20268
20269
|
const canvas = new OffscreenCanvas(width, height);
|
|
20269
|
-
const ctx = canvas.getContext("2d");
|
|
20270
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20270
20271
|
if (!ctx) {
|
|
20271
20272
|
return null;
|
|
20272
20273
|
}
|
|
@@ -20276,7 +20277,7 @@ function createTempCanvas(width, height) {
|
|
|
20276
20277
|
const canvas = document.createElement("canvas");
|
|
20277
20278
|
canvas.width = width;
|
|
20278
20279
|
canvas.height = height;
|
|
20279
|
-
const ctx = canvas.getContext("2d");
|
|
20280
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20280
20281
|
if (!ctx) {
|
|
20281
20282
|
return null;
|
|
20282
20283
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -20202,6 +20202,7 @@ function computeSurfaceSize(width, height, maxWidth, maxHeight, dpiScale = DEFAU
|
|
|
20202
20202
|
}
|
|
20203
20203
|
return { w: clampedW, h: clampedH, scaleX, scaleY };
|
|
20204
20204
|
}
|
|
20205
|
+
var READBACK = { willReadFrequently: true };
|
|
20205
20206
|
function createCanvas(width, height, maxWidth, maxHeight, dpiScale = DEFAULT_DPI_SCALE, maxCanvasDimension = MAX_CANVAS_DIMENSION) {
|
|
20206
20207
|
const { w, h, scaleX, scaleY } = computeSurfaceSize(width, height, maxWidth, maxHeight, dpiScale, maxCanvasDimension);
|
|
20207
20208
|
try {
|
|
@@ -20215,7 +20216,7 @@ function createCanvas(width, height, maxWidth, maxHeight, dpiScale = DEFAULT_DPI
|
|
|
20215
20216
|
`createCanvas: using OffscreenCanvas ${w}\xD7${h}, scale=(${scaleX.toFixed(3)},${scaleY.toFixed(3)})`
|
|
20216
20217
|
);
|
|
20217
20218
|
const canvas = new OffscreenCanvas(w, h);
|
|
20218
|
-
const ctx = canvas.getContext("2d");
|
|
20219
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20219
20220
|
if (!ctx) {
|
|
20220
20221
|
emfWarn('createCanvas: OffscreenCanvas.getContext("2d") returned null');
|
|
20221
20222
|
return null;
|
|
@@ -20229,7 +20230,7 @@ function createCanvas(width, height, maxWidth, maxHeight, dpiScale = DEFAULT_DPI
|
|
|
20229
20230
|
const canvas = document.createElement("canvas");
|
|
20230
20231
|
canvas.width = w;
|
|
20231
20232
|
canvas.height = h;
|
|
20232
|
-
const ctx = canvas.getContext("2d");
|
|
20233
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20233
20234
|
if (!ctx) {
|
|
20234
20235
|
emfWarn('createCanvas: HTMLCanvasElement.getContext("2d") returned null');
|
|
20235
20236
|
return null;
|
|
@@ -20264,7 +20265,7 @@ function createTempCanvas(width, height) {
|
|
|
20264
20265
|
height = Math.max(1, Math.min(Math.floor(height), MAX_CANVAS_DIMENSION));
|
|
20265
20266
|
if (typeof OffscreenCanvas !== "undefined") {
|
|
20266
20267
|
const canvas = new OffscreenCanvas(width, height);
|
|
20267
|
-
const ctx = canvas.getContext("2d");
|
|
20268
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20268
20269
|
if (!ctx) {
|
|
20269
20270
|
return null;
|
|
20270
20271
|
}
|
|
@@ -20274,7 +20275,7 @@ function createTempCanvas(width, height) {
|
|
|
20274
20275
|
const canvas = document.createElement("canvas");
|
|
20275
20276
|
canvas.width = width;
|
|
20276
20277
|
canvas.height = height;
|
|
20277
|
-
const ctx = canvas.getContext("2d");
|
|
20278
|
+
const ctx = canvas.getContext("2d", READBACK);
|
|
20278
20279
|
if (!ctx) {
|
|
20279
20280
|
return null;
|
|
20280
20281
|
}
|