emf-converter 4.8.3 → 4.8.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 +1 -1
- package/dist/browser.js +15 -8
- package/dist/browser.mjs +15 -8
- package/dist/index.js +15 -8
- package/dist/index.mjs +15 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -214,7 +214,7 @@ Everything below is verified against output painted by Windows itself; `src/gdi-
|
|
|
214
214
|
|
|
215
215
|
Everything is measured against output painted by Windows itself; `src/gdi-parity.fixture.test.ts` holds the exact per-fixture bounds. Open work items are tracked in [docs/outstanding-work.md](docs/outstanding-work.md).
|
|
216
216
|
|
|
217
|
-
- **Colour adjustment and image effects**: all eleven EMF+ image effects are supported. Complete native tables cover every legal ColorCurve intensity. Deferred draws retain their effects. JPEG, GIF and TIFF have bundled decoders for environments without Canvas. HSL, tint, red-eye
|
|
217
|
+
- **Colour adjustment and image effects**: all eleven EMF+ image effects are supported. Complete native tables cover every legal ColorCurve intensity. Deferred draws retain their effects. JPEG, GIF and TIFF have bundled decoders for environments without Canvas. Blur and sharpen are exact; HSL, tint, red-eye and GDI colour adjustment retain measured differences; see [the detailed limitations](docs/limitations.md) and the native fixture bounds.
|
|
218
218
|
- **Pen transforms**: EMF+ pen transforms (uniform, nonuniform and skewed) match GDI+ exactly on the 17 pen-transform fixtures, including dashes, which GDI+ lays out along the path in world space at the untransformed pen width. Native fixtures verify dashes under both uniform and non-uniform scales. GDI+ rejects singular pen transforms; the converter ignores such malformed transform data. Square, round, diamond and arrow anchor caps use their native shapes; the new centered-cap fixtures match every pixel with and without antialiasing.
|
|
219
219
|
- **Text**: ANSI, multi-string and small-text records now render; the Windows text fixtures retain a few glyph-edge differences and a `PolyTextOut` C1 control-glyph difference (under 0.1% of pixels; bounds in `src/emf-text-records.fixture.test.ts`). ANSI decoding uses the host's `TextDecoder` for common Windows code pages; Johab and OEM CP437 use bundled Windows mappings. Vertical `ETO_PDY` advances work with and without the `fonts` engine. Without `fonts`, SVG text measurements use deterministic estimates, so precise justification requires supplying the matching fonts.
|
|
220
220
|
- **Wide pens and paths**: flat-capped GDI pens 7 px and wider can differ by a few pixels at round joins, and dashed wide curves follow `WidenPath` (exact for round and flat caps at one logical unit per pixel; square caps differ slightly at path ends); at most 0.2% of pixels on the fixtures. `EMR_WIDENPATH` does not reproduce the extra inner join triangles GDI's own `WidenPath` emits (visible only when the widened outline is itself stroked). EMF+ 1-pixel antialiased lines can differ by one antialiasing sample at their ends, some closed widened outlines by one sample along an edge, and Inset or compound pens on closed figures are approximate.
|
package/dist/browser.js
CHANGED
|
@@ -16810,14 +16810,21 @@ function blurKernel(radius) {
|
|
|
16810
16810
|
k[0] = 1;
|
|
16811
16811
|
return k;
|
|
16812
16812
|
}
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
|
|
16817
|
-
|
|
16818
|
-
|
|
16819
|
-
|
|
16820
|
-
|
|
16813
|
+
const step = truncF32(truncF32(1.4) / Math.fround(radius));
|
|
16814
|
+
const w = new Float64Array(taps + 1);
|
|
16815
|
+
w[0] = 1;
|
|
16816
|
+
let offset = 0;
|
|
16817
|
+
let sum = 1;
|
|
16818
|
+
for (let i = 1; i <= taps; i++) {
|
|
16819
|
+
offset = truncF32(offset + step);
|
|
16820
|
+
w[i] = truncF32(Math.exp(-truncF32(offset * offset)));
|
|
16821
|
+
sum = truncF32(sum + truncF32(2 * w[i]));
|
|
16822
|
+
}
|
|
16823
|
+
const scale = truncF32(256 / sum);
|
|
16824
|
+
for (let i = 0; i <= taps; i++) {
|
|
16825
|
+
const weight = truncF32(w[i] * scale) / 256;
|
|
16826
|
+
k[taps + i] = weight;
|
|
16827
|
+
k[taps - i] = weight;
|
|
16821
16828
|
}
|
|
16822
16829
|
return k;
|
|
16823
16830
|
}
|
package/dist/browser.mjs
CHANGED
|
@@ -16808,14 +16808,21 @@ function blurKernel(radius) {
|
|
|
16808
16808
|
k[0] = 1;
|
|
16809
16809
|
return k;
|
|
16810
16810
|
}
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
|
|
16817
|
-
|
|
16818
|
-
|
|
16811
|
+
const step = truncF32(truncF32(1.4) / Math.fround(radius));
|
|
16812
|
+
const w = new Float64Array(taps + 1);
|
|
16813
|
+
w[0] = 1;
|
|
16814
|
+
let offset = 0;
|
|
16815
|
+
let sum = 1;
|
|
16816
|
+
for (let i = 1; i <= taps; i++) {
|
|
16817
|
+
offset = truncF32(offset + step);
|
|
16818
|
+
w[i] = truncF32(Math.exp(-truncF32(offset * offset)));
|
|
16819
|
+
sum = truncF32(sum + truncF32(2 * w[i]));
|
|
16820
|
+
}
|
|
16821
|
+
const scale = truncF32(256 / sum);
|
|
16822
|
+
for (let i = 0; i <= taps; i++) {
|
|
16823
|
+
const weight = truncF32(w[i] * scale) / 256;
|
|
16824
|
+
k[taps + i] = weight;
|
|
16825
|
+
k[taps - i] = weight;
|
|
16819
16826
|
}
|
|
16820
16827
|
return k;
|
|
16821
16828
|
}
|
package/dist/index.js
CHANGED
|
@@ -16811,14 +16811,21 @@ function blurKernel(radius) {
|
|
|
16811
16811
|
k[0] = 1;
|
|
16812
16812
|
return k;
|
|
16813
16813
|
}
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
|
|
16817
|
-
|
|
16818
|
-
|
|
16819
|
-
|
|
16820
|
-
|
|
16821
|
-
|
|
16814
|
+
const step = truncF32(truncF32(1.4) / Math.fround(radius));
|
|
16815
|
+
const w = new Float64Array(taps + 1);
|
|
16816
|
+
w[0] = 1;
|
|
16817
|
+
let offset = 0;
|
|
16818
|
+
let sum = 1;
|
|
16819
|
+
for (let i = 1; i <= taps; i++) {
|
|
16820
|
+
offset = truncF32(offset + step);
|
|
16821
|
+
w[i] = truncF32(Math.exp(-truncF32(offset * offset)));
|
|
16822
|
+
sum = truncF32(sum + truncF32(2 * w[i]));
|
|
16823
|
+
}
|
|
16824
|
+
const scale = truncF32(256 / sum);
|
|
16825
|
+
for (let i = 0; i <= taps; i++) {
|
|
16826
|
+
const weight = truncF32(w[i] * scale) / 256;
|
|
16827
|
+
k[taps + i] = weight;
|
|
16828
|
+
k[taps - i] = weight;
|
|
16822
16829
|
}
|
|
16823
16830
|
return k;
|
|
16824
16831
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -16809,14 +16809,21 @@ function blurKernel(radius) {
|
|
|
16809
16809
|
k[0] = 1;
|
|
16810
16810
|
return k;
|
|
16811
16811
|
}
|
|
16812
|
-
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
|
|
16817
|
-
|
|
16818
|
-
|
|
16819
|
-
|
|
16812
|
+
const step = truncF32(truncF32(1.4) / Math.fround(radius));
|
|
16813
|
+
const w = new Float64Array(taps + 1);
|
|
16814
|
+
w[0] = 1;
|
|
16815
|
+
let offset = 0;
|
|
16816
|
+
let sum = 1;
|
|
16817
|
+
for (let i = 1; i <= taps; i++) {
|
|
16818
|
+
offset = truncF32(offset + step);
|
|
16819
|
+
w[i] = truncF32(Math.exp(-truncF32(offset * offset)));
|
|
16820
|
+
sum = truncF32(sum + truncF32(2 * w[i]));
|
|
16821
|
+
}
|
|
16822
|
+
const scale = truncF32(256 / sum);
|
|
16823
|
+
for (let i = 0; i <= taps; i++) {
|
|
16824
|
+
const weight = truncF32(w[i] * scale) / 256;
|
|
16825
|
+
k[taps + i] = weight;
|
|
16826
|
+
k[taps - i] = weight;
|
|
16820
16827
|
}
|
|
16821
16828
|
return k;
|
|
16822
16829
|
}
|