Canvas arbitrary path element built from a list of drawing commands.
Summary
Functions
Converts this widget struct to a ui_node() map.
List of path commands (move_to, line_to, etc.).
Fill color or gradient.
Fill rule: "non_zero" or "even_odd".
Creates a new element without an explicit ID (auto-assigned by parent container).
Creates a new element with the given ID and keyword options.
Opacity from 0.0 to 1.0.
Stroke descriptor.
Returns the element type string for the wire protocol.
Applies keyword options to an existing widget struct.
Types
@type t() :: %Plushie.Canvas.Path{ commands: [term()] | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, fill: term() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, fill_rule: (String.t() | atom()) | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, id: String.t() | nil, opacity: number() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, stroke: %Plushie.Canvas.Stroke{ cap: term(), color: term(), dash: term(), join: term(), width: term() } | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil }
Functions
@spec build(widget :: t()) :: Plushie.Widget.ui_node()
Converts this widget struct to a ui_node() map.
List of path commands (move_to, line_to, etc.).
Accepts [term()].
Fill color or gradient.
Accepts term().
Fill rule: "non_zero" or "even_odd".
Accepts String.t() | atom().
Creates a new element without an explicit ID (auto-assigned by parent container).
Creates a new element with the given ID and keyword options.
Opacity from 0.0 to 1.0.
Accepts number().
@spec stroke( widget :: t(), value :: (%Plushie.Canvas.Stroke{ cap: term(), color: term(), dash: term(), join: term(), width: term() } | keyword() | map()) | nil ) :: t()
Stroke descriptor.
Accepts %Plushie.Canvas.Stroke{}.
@spec type_name() :: String.t()
Returns the element type string for the wire protocol.
Applies keyword options to an existing widget struct.