Site navigation

Strokes

A stroke is an ordered, editable outline attached to a shape, path, text, frame, table, or image-bearing shape. It owns its paint and geometry settings and remains separate from raster brush marks, selection outlines, and guides.

Raster brush marks

This guide covers editable vector strokes. For pixel-level illustration work, use the existing Paint, Eraser, and Smudge tools on the same canvas and document. Smudge exposes three reservoir modes in Tool options: Pure smudge, Loaded paint, and Fingerpaint.

The brush browser includes pressure-shaped Sketch Pencil and Inking Nib presets, plus Opaque Paint and Soft Shade starting points. Adjust their size, opacity, flow, and accumulation through the existing brush controls. Stroke-opacity mode caps one gesture at the brush opacity while flow controls buildup; a later gesture can deepen the mark. Existing and imported presets without this setting keep the original buildup behavior. Save custom accumulation choices in the Brush Editor.

Paint follows the selected pixel layer. With no layer selected, it uses an eligible pixel layer on the active page, or creates a named Brush Layer when the canvas has no target. If a vector or other non-pixel object is selected, Varve refuses the stroke instead of quietly painting elsewhere; the screen-reader announcement explains how to create and select a paint layer.

In the verified Design-workspace example, choose Paint from the Design toolbar (or More tools → Raster → Paint when it is collapsed), then select the visible raster source and choose Create clipped paint layer in Tool options. This uses the existing canvas and document. Varve adds a separate raster child named Shading with a live alpha matte; the source remains editable. The browser-verified workflow preserves the clip through undo/redo, save/reopen, and transparent PNG export.

A visible vector shape can also supply the clipping contour while Shading remains a normal raster child. The verified SVG keeps supported vector contours editable and embeds the clipped paint group as a raster fallback. Browser PDF preserves the same appearance through a raster export path; it is not an editable-vector-PDF claim.

Sample merged layers is an explicit opt-in setting. It reads a read-only snapshot of visible raster-layer tiles while depositing only on the active target, which makes clipped texture and paintover passes safer. It does not implicitly sample vector nodes, group isolation, effects, or transformed non-raster content; use an explicit flattened raster copy when those sources are required.

Selections into flats

  1. Create a marquee, pixel-lasso, quick-mask, or image-derived selection.
  2. Select one visible, unlocked pixel layer as the destination.
  3. Open Selection Sources in the Inspector and choose Fill pixel layer.

The fill is one undoable tile mutation and leaves the selection active for another colour pass. Feathered or anti-aliased selection coverage remains soft; a locked, hidden, vector, or image-only target is refused instead of being silently rasterized. This is a selection fill, not a full line-art bucket detector: use the existing image-derived Magic Wand or lasso to define the region first.

Inspector workflow

  1. Select a supported layer and open Stroke in the Inspector.
  2. Set paint, width, visibility, and alignment in the compact row.
  3. The collapsed Advanced toggle names every non-default setting ("Advanced · Dashed · Per-side"), so a customised stroke never reads as plain.
  4. Open Advanced for dash presets, caps, joins, per-side rectangle widths, endpoint markers, gradient paint, and dash phase. Controls that do not apply are omitted rather than disabled: miter limit appears only for miter joins, dash phase only while dashed, arrowheads only for lines and open paths, and per-side widths behind a switch that offers Use one width to return to a uniform outline.
  5. Use the up/down controls to change stroke paint order, or the direct controls on stacked strokes. Reordering keeps each stroke instance's identity.
  6. Add Stroke copies the layer's previous stroke — colour, width, dash, and caps — so a repeated outline does not restart from the 1px black default.

Dash style offers Solid, Dashed, Dotted, and Dash-dot presets in absolute canvas units. Choose Custom to enter an exact comma- or space-separated pattern; malformed values are rejected instead of partially applied. A zero-width stroke is flagged as invisible on its row.

Alignment and geometry

Center strokes straddle the authored path. Inside and outside alignment are defined against an enclosed region and fill rule, not against whether a fill happens to be opaque. Open paths and lines keep centered behavior because “inside” and “outside” have no unambiguous region meaning there.

Closed Bézier paths retain their final curved segment. Compound path contours and holes are included in the outline and use the path fill rule.

Layer and runtime support

TargetLive Canvas2D / WASM IRNotes
Shape and pathFull live stroke replayCenter/inside/outside for regions, caps, joins, dashes, gradients, pressure profiles, markers
Editable textGlyph stroke in Canvas2DText remains editable; text-on-path uses the existing path layout route
Image-bearing shapeFrame border and alpha-aware stroke pathsDoes not silently turn an image border into a subject silhouette
Frame/tableSupported in live replayExport support depends on the target and may rasterize the boundary
Native desktopSame camelCase wire fieldsNative scene mirror preserves stroke identity, alignment, per-side weights, markers, and gradients

Export behavior

  • PNG/raster: uses the full Canvas2D replay path.
  • SVG: supported center strokes, spatial linear/radial gradients, dashes, caps/joins/miter limits, endpoint markers, and editable text strokes remain native. Unsupported alignment, per-side, pressure-variable, image-border, frame, or complex stack cases use a local raster fallback.
  • PDF/print: native path output covers the basic center-stroke contract; unsupported stroke features are routed through the export compositor so a PDF does not silently lose them.

Raster fallback is bounded to the smallest affected export boundary. It preserves the live appearance while keeping unrelated siblings vector-editable where the format allows it.

History and transfer

Stroke edits use the existing editor transaction coordinator. Copy/paste and style transfer clone the stroke payload and mint independent destination IDs, so later edits do not mutate the source or collide with its bindings. Legacy documents without IDs receive deterministic IDs at codec normalization.

Search Varve