mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-01 13:47:21 -06:00
SVG export ignored an image's colorize paint and wrote the image's own black, white and gray pixels. EPS export flattened every colorized image into a process-color raster, so a spot color lost its plate. Both now write the image in the fill color, with the coverage the canvas and PDF export use (darkness times alpha), so white and transparent pixels take no color. - SVG writes a coverage PNG as a mask over a rectangle in the color, shared between repeated images while each keeps its own color. Linked mode writes the coverage PNG as a file, and SVG Tiny 1.2 writes a PNG in the color. A colorized image whose pixels are missing, or whose grayscale pixels can't be decoded, is left out with a warning. - EPS writes fully covered or uncovered pixels as an imagemask in the color's process or Separation ink (Registration on every plate), and a grayscale image as ink samples scaled by coverage. Level 3 masks its uncovered pixels out and Level 2 writes them white; gray midtones are written over white, with the existing warnings. - EPS flattening no longer counts a solid colorize paint on a grayscale or 1-bit image as transparency by itself. Opacity, blending modes, opacity masks, effects and overlapping transparent art still flatten it, and so does a colorize paint the writer can't draw. The svg crate's tests turn on resvg's raster-images feature to render the embedded PNGs. Docs: docs/mcp.md, docs/target-app-parity.md.
39 lines
870 B
Rust
39 lines
870 B
Rust
//! Integration tests: one test binary for the crate, one module per area.
|
||
// Unwrapping and panicking on failure is fine here, unlike in shipped code (AGENTS.md › Robustness).
|
||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||
|
||
mod basic_shapes;
|
||
mod blend_export;
|
||
mod colorized_images;
|
||
mod colour_glyphs;
|
||
mod container_export;
|
||
mod css_rules;
|
||
mod dash_align;
|
||
mod data_attributes;
|
||
mod effects_export;
|
||
mod encoding_profile_fonts;
|
||
mod focal;
|
||
mod font_weights;
|
||
mod foreign_attributes;
|
||
mod gradients;
|
||
mod ids;
|
||
mod import_details;
|
||
mod import_live;
|
||
mod import_text;
|
||
mod import_units;
|
||
mod interactivity;
|
||
mod mask_options;
|
||
mod mesh_export;
|
||
mod non_scaling_stroke;
|
||
mod options;
|
||
mod prop_svg;
|
||
mod raster_paints;
|
||
mod roundtrip;
|
||
mod stroke_export;
|
||
mod svg_glyphs;
|
||
mod symbols_layers;
|
||
mod text_layout;
|
||
mod text_paint_order;
|
||
mod text_stroke;
|
||
mod title_control_chars;
|