Skip to content

vellum 0.6.7

Choose a tag to compare

@schochastics schochastics released this 02 Aug 14:43
· 7 commits to main since this release
  • 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 of id="c0". All N clip-path="url(#c0)"
    references therefore resolved to the first frame's clip — which lives inside
    a visibility:hidden group, 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-delay was offset by i rather than n - i, so after frame 0 the
    cycle ran backwards (0, n-1, n-2, …).

  • Fix: a gradient (or pattern) col collapsed 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 its viewBox, and read a whole <svg>.
    Icon sets share one viewBox per family and pad each glyph inside it, so
    sizing to the glyph's own ink blew every icon up to size individually — 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 a viewbox argument (c(xmin, ymin, width, height), or the raw
    "0 0 24 24" attribute string) and maps the box to size, so glyphs keep
    their intended relative and absolute size. Passing a whole <svg>…</svg>
    element as d reads its <path> geometry and viewBox automatically (needs
    \pkg{xml2}; non-<path> shapes are reported, not silently dropped). With no
    viewBox the previous ink-bounds sizing is unchanged.