mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-30 04:37:29 -06:00
Export: the art's bounds take in the effects of groups, type and images
The bounds of the visible art (`vectorcraft_render::encode::art_bounds`) are the crop of Export with Use Artboards off, EPS without artboards, Export for Screens' Full Document and Save for Web (Legacy) with Clip to Artboard off, and the size Fit to Artwork Bounds gives an artboard. They measured a group or layer by its members and left out its own effects, and measured type and images without their effects. A group's drop shadow, or the shadow of a line of type, was cut off at the image's edge and left outside the fitted artboard. They also counted a Shaper group's transparent source art. Each visible object is now measured by `vectorcraft_render::effect_bounds`, the measure of Export Selection's crop. A group or layer without effects of its own is still measured by its visible members, skipping a Shaper group's source art. A group or layer with a drop shadow, a glow or another raster effect is measured without its hidden members, guides and template layers, unless it is a Shaper group or also has a geometry, Pathfinder, Crop Marks or 3D effect or a visible effect on its own fill or stroke. The SVG of a chosen artboard also keeps an object whose effects alone reach the artboard. Docs: docs/mcp.md, docs/target-app-parity.md.
This commit is contained in:
+5
-3
@@ -502,7 +502,9 @@ Draw, look, export:
|
||||
|
||||
Export As goes through `options` too: for PNG, JPEG and WebP `useArtboards: true` writes one file per artboard (all,
|
||||
or `range`), named `<file>-<artboard>.<ext>`, and returns `{path, files}` (a PDF keeps them as pages of one file; an
|
||||
SVG writes one file per artboard of a `range`); `useArtboards: false` exports the bounds of the visible art.
|
||||
SVG writes one file per artboard of a `range`); `useArtboards: false` exports the bounds of the visible art with what
|
||||
its effects paint, the effects of groups, type and images included. `artboard.fitToArt` measures the art the same
|
||||
way.
|
||||
|
||||
Raster exports take more options in `options`: `ppi` (72, 150, 300…; stored in the file), `background`
|
||||
(`transparent`, `white`, `black` or `"#rrggbb"`), `antiAlias` (`none`, `art`, `type`: text snapped to pixels) and,
|
||||
@@ -1581,8 +1583,8 @@ its symbol is missing, when its symbol or a symbol nested in its art holds an in
|
||||
nest 32 deep in its art. PDF and EPS export and the SVG of an artboard leave out art outside the page or artboard, and
|
||||
Skip Blank Artboards skips an artboard with no art on it. For both, the box of an instance whose art holds brushed
|
||||
strokes grows by 16 times the widest stroke (at least 1 pt) of the objects in its art that have a brushed stroke,
|
||||
plus 8 pt. The SVG of an artboard also keeps an object that holds an instance when the effects in the symbol's art, or
|
||||
the instance's own, paint onto the artboard.
|
||||
plus 8 pt. The SVG of an artboard also keeps an object whose effects paint onto the artboard, and an object that holds
|
||||
an instance when the effects in the symbol's art, or the instance's own, paint onto it.
|
||||
|
||||
## Expand
|
||||
|
||||
|
||||
Reference in New Issue
Block a user