Defines PlotjeMembrane -- the value type returned by the
membrane stage of the pipeline.
A PlotjeMembrane is a Membrane UI component implementing
IOrigin, IBounds, and IChildren, so it composes naturally
with other Membrane components and renders through any Membrane
backend without special-casing.
Fields:
:drawables a vector of membrane.ui drawing primitives:width canvas width in drawing units:height canvas height in drawing unitsPlus optional namespaced attributes carried as map entries:
:plotje/title the plot title, or absent when unsetFuture per-membrane attributes (subtitle, caption, ...) are added
as :plotje/* keys via assoc, not as new record fields, so the
record arity stays stable.
This namespace requires [membrane.ui]. Other impl/ namespaces
keep that dependency at arm's length, but the membrane stage's
value type cannot avoid it -- a PlotjeMembrane is, by
definition, a Membrane component.
Defines `PlotjeMembrane` -- the value type returned by the membrane stage of the pipeline. A `PlotjeMembrane` is a Membrane UI component implementing `IOrigin`, `IBounds`, and `IChildren`, so it composes naturally with other Membrane components and renders through any Membrane backend without special-casing. Fields: - `:drawables` a vector of `membrane.ui` drawing primitives - `:width` canvas width in drawing units - `:height` canvas height in drawing units Plus optional namespaced attributes carried as map entries: - `:plotje/title` the plot title, or absent when unset Future per-membrane attributes (subtitle, caption, ...) are added as `:plotje/*` keys via `assoc`, not as new record fields, so the record arity stays stable. This namespace requires `[membrane.ui]`. Other `impl/` namespaces keep that dependency at arm's length, but the membrane stage's value type cannot avoid it -- a `PlotjeMembrane` is, by definition, a Membrane component.
(explain x)Explain why x does not conform to PlotjeMembraneSchema. Returns
nil if valid, or a Malli explanation map if invalid.
Explain why x does not conform to `PlotjeMembraneSchema`. Returns nil if valid, or a Malli explanation map if invalid.
(membrane-tree? x)True if x looks like a Membrane drawable tree -- either a
PlotjeMembrane record (the canonical Plotje shape) or a non-empty
vector whose first element satisfies membrane.ui/IOrigin (a
hand-built Membrane drawable tree).
Used by Plotje's input-validation gate to detect when a user has
accidentally piped a rendered membrane back into a function that
expects a pose, so the error can advise calling pj/membrane->plot
instead. Rejection diagnostic only -- not used to accept input.
True if x looks like a Membrane drawable tree -- either a `PlotjeMembrane` record (the canonical Plotje shape) or a non-empty vector whose first element satisfies `membrane.ui/IOrigin` (a hand-built Membrane drawable tree). Used by Plotje's input-validation gate to detect when a user has accidentally piped a rendered membrane back into a function that expects a pose, so the error can advise calling `pj/membrane->plot` instead. Rejection diagnostic only -- not used to accept input.
(membrane? x)True if x is a PlotjeMembrane -- the canonical value returned by
pj/plan->membrane and pj/membrane.
True if x is a `PlotjeMembrane` -- the canonical value returned by `pj/plan->membrane` and `pj/membrane`.
Malli schema for the PlotjeMembrane record, validated as a map.
Backend authors writing their own membrane->plot defmethod read
width/height via (membrane.ui/width m)/(membrane.ui/height m)
(derived from IBounds) and title via (:plotje/title m).
Malli schema for the `PlotjeMembrane` record, validated as a map. Backend authors writing their own `membrane->plot` defmethod read width/height via `(membrane.ui/width m)`/`(membrane.ui/height m)` (derived from `IBounds`) and title via `(:plotje/title m)`.
(valid? x)True if x conforms to PlotjeMembraneSchema.
True if x conforms to `PlotjeMembraneSchema`.
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 |