vellum 0.6.7
-
Fix: an animated SVG showed one frame and then near-nothing. Every frame is
rendered separately, so each restarted its<defs>id counters and the whole
document ended up with N copies ofid="c0". All Nclip-path="url(#c0)"
references therefore resolved to the first frame's clip — which lives inside
avisibility:hiddengroup, and a hidden<clipPath>child contributes no
geometry, so the clip was empty for the 47/48 of the cycle when frame 0 was
hidden. Everything inside the panel was clipped away, leaving only the axis
labels and legend drawn outside it, and the plot appeared to blink once and
then vanish. Generated<defs>ids now carry a per-frame prefix. -
Fix: animated SVG frames played in reverse. The per-frame negative
animation-delaywas offset byirather thann - i, so after frame 0 the
cycle ran backwards (0, n-1, n-2, …). -
Fix: a gradient (or pattern)
colcollapsed to its first stop on circle
outlines. Circles take a batched fast path that draws a unit circle placed
by an affine transform; a gradient stroke is resolved in viewport pixels, so
on the unit circle it sampled a single point of the ramp and rendered one flat
colour. The same gradient stroked rects and polylines correctly. A gradient/
pattern stroke now drops circles to the per-element, real-coordinate build (as
rects already did), so the ramp runs along the outline. Solid strokes keep the
fast path and render byte-identically. -
svg_grob()can size an icon to itsviewBox, and read a whole<svg>.
Icon sets share oneviewBoxper family and pad each glyph inside it, so
sizing to the glyph's own ink blew every icon up tosizeindividually — a
sparse glyph rendered far larger than a dense one from the same set, and a lone
icon larger than its nominal box (the reported ~2.5× oversize).svg_grob()
now takes aviewboxargument (c(xmin, ymin, width, height), or the raw
"0 0 24 24"attribute string) and maps the box tosize, so glyphs keep
their intended relative and absolute size. Passing a whole<svg>…</svg>
element asdreads its<path>geometry andviewBoxautomatically (needs
\pkg{xml2}; non-<path>shapes are reported, not silently dropped). With no
viewBox the previous ink-bounds sizing is unchanged.