Canvas line element between two points with optional stroke and opacity.
Summary
Functions
Converts this widget struct to a ui_node() map.
Creates a new element without an explicit ID (auto-assigned by parent container).
Creates a new element with the given ID, positional args, 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.
Start X in pixels.
End X in pixels.
Start Y in pixels.
End Y in pixels.
Types
@type t() :: %Plushie.Canvas.Line{ 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, x1: number() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, x2: number() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, y1: number() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, y2: number() | 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.
Creates a new element without an explicit ID (auto-assigned by parent container).
Creates a new element with the given ID, positional args, 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.
Start X in pixels.
Accepts number().
End X in pixels.
Accepts number().
Start Y in pixels.
Accepts number().
End Y in pixels.
Accepts number().