mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 04:38:29 +00:00
A new gradient kind, `diamond`, runs its stops from the center (the start) out to a square with a corner at the end of the vector; the aspect stretches the square across the vector into a rhombus. The Gradient panel's Type row has a Diamond button, the Gradient tool draws the square with the aspect handle and center ring, and a gradient fitted to an object covers its box. - Model and canvas: the level is |x| + |y| in the square's frame; a square with no area (no vector, an aspect of 0, numbers out of range) paints the last stop. The canvas draws it as pixels, out to a stroke's miters, caps and arrowheads. Transforms keep the vector and take the mapped size across it as the aspect. - Commands: `paint.setFill`, `paint.editGradient` and `paint.setGradientGeom` take `kind: "diamond"`; a negative aspect or a focal point is an error. A conic or diamond gradient that a plug-in returns with a focal point loses the focal point. - Gradient tool: dragging the aspect handle of a radial or diamond gradient whose file gave it a negative aspect now sets a positive aspect; only a conic's negative aspect mirrors it. - Export: PDF, SVG, EPS and legacy .ai write four linear gradients, one for each quarter of the square, clipped to the shape (PDF as axial shadings). PDF and SVG write an image for translucent stops, a dithered fill or a flat square, and for the Perceptual method unless PDF writes the stops as spot color shadings. SVG writes a diamond on type characters as a radial gradient through the corners, and so does CSS. A swatch library saved as CSS gets four corner layers, a value for the `background` property (a circle when the swatch is turned by an angle that is not a multiple of 90 degrees). The .ai editing data holds a radial gradient through the corners. The document exports give a warning. - SVG export: a stroke drawn as an image, as conic wedges or as diamond quarters now covers the miters, caps and arrowheads that reach past its paint box. - PDF import reads a function-based shading whose color is the same along each square about the origin of its space as a diamond. - Object > Expand gives nested squares or a mesh of rings. Docs: docs/mcp.md, docs/target-app-parity.md.
42 lines
909 B
Rust
42 lines
909 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 clip_text;
|
||
mod colorized_images;
|
||
mod colour_glyphs;
|
||
mod conic;
|
||
mod container_export;
|
||
mod css_rules;
|
||
mod dash_align;
|
||
mod data_attributes;
|
||
mod diamond;
|
||
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;
|