mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 12:21:08 +01:00
Images: Overprint Fill makes a colorized image's color overprint
A grayscale or 1-bit image colorized with a fill color had no way to
overprint: object.setOverprint {fill: true} changed nothing, since an
image has no fill row. The color now carries its own overprint flag
(colorize_overprint in native files).
- object.setOverprint (fill, without item) and attributes.info set and
read it; Overprint Black and Print Ink Fixes' Remove White Overprint
treat the color as the image's fill.
- Overprint Preview, Separations Preview and printed separations show
the inks below the image where its color has none; on a plate the
color puts no ink on, the image is left out.
- PDF export draws the image in an overprinting graphics state, a
process color as an image of only the process inks it puts down.
- EPS export turns overprinting on for it, and now leaves white fills,
strokes and colorized images knocking out with Discard White
Overprint, as PDF export does.
- A legacy .ai file writes it as the image mask's fill overprint and
reads it back. Warped pieces, geometry-effect copies and flattening
keep or drop it as they do for fills.
- A white spot color is an ink: with Discard White Overprint it keeps
overprinting in PDF and EPS export and in both previews.
Docs: docs/mcp.md (Overprint, Print Ink Fixes), docs/target-app-parity.md.
This commit is contained in:
1 parent
db9acab4da
commit
4f73ef7fbb
29 files changed
+583
-83
No files matched your search
@@ -63,6 +63,10 @@ pub struct NodeExtras {
|
||||
/// colorizes it. Each pixel is drawn in this color, as opaque as the pixel is dark, so white
|
||||
/// pixels are transparent. `None`: the image shows its own pixels.
|
||||
pub colorize: Option<Box<vectorcraft_color::Paint>>,
|
||||
/// Attributes panel › Overprint Fill on a colorized image: its color prints over the inks
|
||||
/// below instead of knocking them out. It counts only while [`Self::colorize`] is set
|
||||
/// ([`crate::Node::colorize_overprints`]).
|
||||
pub colorize_overprint: bool,
|
||||
/// Pathfinder panel › Make Compound Shape: this group is a compound shape
|
||||
/// ([`Node::is_compound_shape`], [`crate::compound_shape`]).
|
||||
pub compound_shape: bool,
|
||||
@@ -115,6 +119,7 @@ pub(super) static NO_EXTRAS: NodeExtras = NodeExtras {
|
||||
live_paint_gaps: None,
|
||||
objects_on_path: None,
|
||||
colorize: None,
|
||||
colorize_overprint: false,
|
||||
compound_shape: false,
|
||||
shape_mode: crate::ShapeMode::Add,
|
||||
symbol_overrides: Vec::new(),
|
||||
|
||||
@@ -51,6 +51,7 @@ impl Serialize for Node {
|
||||
e.live_paint_gaps.is_none(),
|
||||
e.objects_on_path.is_none(),
|
||||
e.colorize.is_none(),
|
||||
is_default(&e.colorize_overprint),
|
||||
is_default(&e.compound_shape),
|
||||
is_default(&e.shape_mode),
|
||||
e.symbol_overrides.is_empty(),
|
||||
@@ -99,6 +100,7 @@ impl Serialize for Node {
|
||||
field!("live_paint_gaps", &e.live_paint_gaps);
|
||||
field!("objects_on_path", &e.objects_on_path);
|
||||
field!("colorize", &e.colorize);
|
||||
field!("colorize_overprint", &e.colorize_overprint);
|
||||
field!("compound_shape", &e.compound_shape);
|
||||
field!("shape_mode", &e.shape_mode);
|
||||
field!("symbol_overrides", &e.symbol_overrides);
|
||||
@@ -244,6 +246,8 @@ pub(super) struct NodeWire {
|
||||
#[serde(default)]
|
||||
colorize: Option<Box<vectorcraft_color::Paint>>,
|
||||
#[serde(default)]
|
||||
colorize_overprint: bool,
|
||||
#[serde(default)]
|
||||
compound_shape: bool,
|
||||
#[serde(default)]
|
||||
shape_mode: crate::ShapeMode,
|
||||
@@ -477,6 +481,7 @@ impl From<NodeWire> for Node {
|
||||
live_paint_gaps: w.live_paint_gaps,
|
||||
objects_on_path: w.objects_on_path,
|
||||
colorize: w.colorize,
|
||||
colorize_overprint: w.colorize_overprint,
|
||||
compound_shape: w.compound_shape,
|
||||
shape_mode: w.shape_mode,
|
||||
symbol_overrides: w.symbol_overrides,
|
||||
|
||||
Reference in new issue
Block a user