Build a membrane drawable tree from a plan. Plan → membrane is format-agnostic: the drawable tree can be converted to SVG, PNG, or any other format membrane supports.
Build a membrane drawable tree from a plan. Plan → membrane is format-agnostic: the drawable tree can be converted to SVG, PNG, or any other format membrane supports.
(membrane-tree? x)True if x looks like a Membrane drawable tree -- a non-empty
vector whose first element satisfies membrane.ui/IOrigin.
Borrows Membrane's own contract for 'is this a UI element?'
rather than inventing a Plotje-side predicate. Used by the
public-API input gate to distinguish a pose from an
already-rendered membrane vector that the user might pass
back in.
True if x looks like a Membrane drawable tree -- a non-empty vector whose first element satisfies `membrane.ui/IOrigin`. Borrows Membrane's own contract for 'is this a UI element?' rather than inventing a Plotje-side predicate. Used by the public-API input gate to distinguish a pose from an already-rendered membrane vector that the user might pass back in.
Build a membrane drawable tree from a plan. Returns a vector of membrane drawables representing the complete plot.
Dispatches on (boolean (:composite? plan)) -- two methods only,
keyed false (leaf) and true (composite). The
pipeline-composition-test namespace asserts this invariant at
CI time.
An earlier version dispatched on the defrecord class
((fn [plan _] (class plan))). Reloading impl/resolve.clj
(which defines Plan/CompositePlan) replaced those classes,
but the multimethod retained the OLD class objects forever,
pinning their classloaders and causing persistent metaspace
growth across edit sessions (~70 sibling classes per record
reload). Fixed in commit 6a9ac87 (2026-04-28) by switching to
boolean dispatch, which has no class identity and so cannot leak
across reloads.
If you need a third dispatch case, add another boolean-derived key (e.g. on a property of the plan), not a class.
2-arity takes an opts map. Recognized keys: :tooltip -- when truthy, enables tooltip text generation on data marks.
Build a membrane drawable tree from a plan. Returns a vector of membrane drawables representing the complete plot. Dispatches on `(boolean (:composite? plan))` -- two methods only, keyed `false` (leaf) and `true` (composite). The `pipeline-composition-test` namespace asserts this invariant at CI time. ## DO NOT change this dispatch to class-based. An earlier version dispatched on the defrecord class (`(fn [plan _] (class plan))`). Reloading `impl/resolve.clj` (which defines `Plan`/`CompositePlan`) replaced those classes, but the multimethod retained the OLD class objects forever, pinning their classloaders and causing persistent metaspace growth across edit sessions (~70 sibling classes per record reload). Fixed in commit 6a9ac87 (2026-04-28) by switching to boolean dispatch, which has no class identity and so cannot leak across reloads. If you need a third dispatch case, add another boolean-derived key (e.g. on a property of the plan), not a class. 2-arity takes an opts map. Recognized keys: :tooltip -- when truthy, enables tooltip text generation on data marks.
(render-alpha-legend alpha-legend x y)Render an alpha legend -- squares with varying opacity and value labels. Returns a vector of membrane drawables.
Render an alpha legend -- squares with varying opacity and value labels. Returns a vector of membrane drawables.
(render-legend-from-plan legend x y cfg)Render legend from plan legend data as membrane drawables. Public so the compositor can reuse the renderer for composite-level shared legends (one legend per composite, not per leaf).
Render legend from plan legend data as membrane drawables. Public so the compositor can reuse the renderer for composite-level shared legends (one legend per composite, not per leaf).
(render-size-legend size-legend x y)Render a size legend -- graduated circles with value labels. Returns a vector of membrane drawables.
Render a size legend -- graduated circles with value labels. Returns a vector of membrane drawables.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |