.cdr import: an ellipse of version 1 or 2 without its angles is damage

A drawn ellipse whose record ends before its two angles came in as a
whole ellipse with no warning; it is now left out as damage. The file
format table now says that version 3 envelopes are not applied and the
objects under them are kept, and gives one count of the formats opened.
PROVENANCE.md, the crate README and docs/mcp.md now say which parts of
versions 1 to 4 public specifications cover.
This commit is contained in:
dotCooCoo
2026-11-12 14:07:48 -08:00
parent f940e5e0f2
commit 75ac55b32a
5 changed files with 25 additions and 8 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ Ordinary File > Save offers Save As when its own location refuses writes with a
|---|---:|---:|---|
| Formats opened or placed | ~30 | 31 | missing: FreeHand, DWG, PICT, PS |
| Formats saved (Save As) | 6 (AI, AIT, PDF, EPS, SVG, SVGZ) | 6 + native | `.ai` written PDF-compatible (with an editing copy of the art: layers, groups, paths, colors, artboards) or as legacy version 7 (layers and groups, one artboard per file) |
| Formats opened or placed | ~30 | 29 | missing: FreeHand, CorelDRAW, DWG, HEIC/HEIF, PICT, PS |
| Formats opened or placed | ~30 | 30 | missing: FreeHand, DWG, HEIC/HEIF, PICT, PS |
| Formats saved (Save As) | 6 (AI, AIT, PDF, EPS, SVG, SVGZ) | 6 + native | `.ai` written PDF-compatible (with an editing copy of the art: layers, groups, paths, colors, gradients, patterns, images, type, symbols, artboards, transparency, opacity masks, clipping) or as legacy version 7 (layers and groups, one artboard per file) |
| Formats exported | ~16 | 18 | missing: DWG; extra: GIF/PNG-8 palette export, DXF up to 2018, layered PSD |
| **Overall (weighted by use)** | | **~75%** | `.ai` and PDF dominate the weighting |
@@ -308,7 +308,7 @@ Names in the editing data that aren't UTF-8 (layers, objects, artboards, colors,
| PICT | open, place (legacy) | no | no | rarely used |
| Pixar PXR | open, place (legacy) | yes (any set of the R, G, B and A channels in 8 or 12 bits, dumped or run-length encoded, in tiles; R alone is gray; alpha matted to black or unassociated) | no | recognized by its magic number; 12-bit samples are clamped to 0.0 to 1.0; null tiles are transparent with A and black without; the offsets aren't read, and the image takes the default resolution; a file cut short, with header values or packets the format doesn't define, or past the pixel allowance is refused with a message; tested on synthetic files only; tests in `crates/engine/src/cmd/fileio/tests_pxrread.rs` and `crates/engine/tests/import_fuzz.rs` |
| FreeHand `.fh*` | open (legacy) | no | no | |
| `.cdr` drawings | open | yes (versions 1 to 27, the `WL` files of versions 1 and 2 and the ZIP packages of versions 14 on included: pages, layers, guidelines, groups, PowerClips, curves, paths, rectangles, ellipses, arcs, polygons, uniform fills and outlines, from the object's style where it has none of its own; text, bitmaps, blends, contours, brush strokes, fountain, pattern, texture and PostScript fills and arrowheads are left out with a warning, and lenses and object transparency are not applied, with a warning; versions 1 and 2 open as one page and one layer without groups, arcs or pies, and version 3 objects under an envelope are left out with a warning; encrypted, ZIP64 and split packages are refused) | no | `.cdt` templates open as new untitled documents; File › Place reads both; record layouts and their sources in `crates/cdr/PROVENANCE.md`; synthetic test files only; tests in `crates/cdr/tests/it/read.rs`, `crates/engine/src/cmd/fileio/tests_cdr.rs` and `crates/engine/tests/import_fuzz.rs` |
| `.cdr` drawings | open | yes (versions 1 to 27, the `WL` files of versions 1 and 2 and the ZIP packages of versions 14 on included: pages, layers, guidelines, groups, PowerClips, curves, paths, rectangles, ellipses, arcs, polygons, uniform fills and outlines, from the object's style where it has none of its own; text, bitmaps, blends, contours, brush strokes, fountain, pattern, texture and PostScript fills and arrowheads are left out with a warning, and lenses and object transparency are not applied, with a warning; versions 1 and 2 open as one page and one layer without groups, arcs or pies; version 3 envelopes are not applied, so the objects and groups under one keep their outlines and matrices, with a warning; encrypted, ZIP64 and split packages are refused) | no | `.cdt` templates open as new untitled documents; File › Place reads both; record layouts and their sources in `crates/cdr/PROVENANCE.md`; synthetic test files only; tests in `crates/cdr/tests/it/read.rs`, `crates/engine/src/cmd/fileio/tests_cdr.rs` and `crates/engine/tests/import_fuzz.rs` |
| Text `.txt` | place, export | place (Text Import Options) | yes | |
| RTF `.rtf` | place | place (area type with fonts, size, bold, italic, underline, strikethrough, caps, superscript and subscript, color, alignment, indents and paragraph spacing) | no | `tests/textimport.rs`, `place/rtf.rs`; fuzzed (`text_import_fuzz.rs`); `\'hh` bytes read as Windows-1252 or Mac Roman only |
| Word `.docx` | place | place (area type with the document's styles and its fonts, size, bold, italic, underline, strikethrough, caps, superscript and subscript, color, alignment, indents and paragraph spacing) | no | `tests/textimport.rs`, `place/docx.rs`; fuzzed (`text_import_fuzz.rs`); list numbers, pictures and text boxes are left out |
+1 -1
View File
@@ -6856,7 +6856,7 @@ transparency are not applied. The `warnings` of
were left out. Drawings of versions after 27 are refused with a message, and so are packages that are
encrypted, ZIP64 archives or split across files. VectorCraft doesn't write `.cdr` files.
No public specification covers versions 1 to 4, so the importer reads the layouts found in public sample files. A
Public specifications cover only parts of versions 1 to 4, so for the rest the importer reads the layouts found in public sample files. A
drawing of version 1 or 2 opens as one page with one layer: its rectangles, whole ellipses and curves with their
matrices, uniform fills and outlines with their width and color. Its text, its arcs and pies, and its fills of other
types are left out with the same warnings, and its groups are not kept. An object of another type ends the read of