Canvas raster image element with position, size, and optional rotation.
Summary
Functions
Converts this widget struct to a ui_node() map.
Height in pixels.
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.
Rotation angle in degrees. Accepts {value, :rad} for radians.
Path to the image file.
Returns the element type string for the wire protocol.
Width in pixels.
Applies keyword options to an existing widget struct.
X position in pixels.
Y position in pixels.
Types
@type t() :: %Plushie.Canvas.Image{ h: number() | 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, rotation: float() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, source: (String.t() | atom()) | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, w: number() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, x: number() | Plushie.Animation.Transition.t() | Plushie.Animation.Spring.t() | Plushie.Animation.Sequence.t() | nil, y: 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.
Height in pixels.
Accepts number().
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 rotation( widget :: t(), value :: (number() | {number(), :deg} | {number(), :rad}) | nil ) :: t()
Rotation angle in degrees. Accepts {value, :rad} for radians.
Accepts float().
Path to the image file.
Accepts String.t() | atom().
@spec type_name() :: String.t()
Returns the element type string for the wire protocol.
Width in pixels.
Accepts number().
Applies keyword options to an existing widget struct.
X position in pixels.
Accepts number().
Y position in pixels.
Accepts number().