Added CM_ARG_COUNT and CM_DEGENERATE diagnostic codes for the cm operator. The cm operator was already implemented in render.rs and type3_rasterizer.rs; this change adds proper error handling for: - Wrong argument count (must be exactly 6 numbers) - Degenerate matrices (NaN values or determinant == 0) When errors occur, diagnostics are emitted and the CTM is not modified (clamped to identity). Closes: pdftract-p7yll Files modified: - crates/pdftract-core/src/diagnostics.rs: Added CmArgCount, CmDegenerate - crates/pdftract-core/src/render.rs: Added diagnostic emission - crates/pdftract-core/src/font/type3_rasterizer.rs: Added diagnostic emission - crates/pdftract-cli/src/main.rs: Added CLI output for new diagnostics Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| build.rs | ||
| Cargo.toml | ||
| pdftract-cli.cdx.json | ||