View Source Evision.Animation (Evision v0.2.17-rc1)
Summary
Functions
Constructs an Animation object with optional loop count and background color.
Constructs an Animation object with optional loop count and background color.
Types
@type t() :: %Evision.Animation{ref: reference()}
Type that represents an Animation struct.
ref.
reference()The underlying erlang resource variable.
Functions
Constructs an Animation object with optional loop count and background color.
Keyword Arguments
loopCount:
integer().An integer representing the number of times the animation should loop:
0(default) indicates infinite looping, meaning the animation will replay continuously.- Positive values denote finite repeat counts, allowing the animation to play a limited number of times.
- If a negative value or a value beyond the maximum of
0xffff(65535) is provided, it is reset to0(infinite looping) to maintain valid bounds.
bgColor:
Evision.scalar().A
Scalarobject representing the background color in BGR format:- Defaults to
Scalar(), indicating an empty color (usually transparent if supported). - This background color provides a solid fill behind frames that have transparency, ensuring a consistent display appearance.
- Defaults to
Return
- self:
Evision.Animation.t()
Python prototype (for reference only):
Animation([, loopCount[, bgColor]]) -> <Animation object>
@spec animation(Keyword.t()) :: any() | {:error, String.t()}
@spec animation([bgColor: term(), loopCount: term()] | nil) :: t() | {:error, String.t()}
Constructs an Animation object with optional loop count and background color.
Keyword Arguments
loopCount:
integer().An integer representing the number of times the animation should loop:
0(default) indicates infinite looping, meaning the animation will replay continuously.- Positive values denote finite repeat counts, allowing the animation to play a limited number of times.
- If a negative value or a value beyond the maximum of
0xffff(65535) is provided, it is reset to0(infinite looping) to maintain valid bounds.
bgColor:
Evision.scalar().A
Scalarobject representing the background color in BGR format:- Defaults to
Scalar(), indicating an empty color (usually transparent if supported). - This background color provides a solid fill behind frames that have transparency, ensuring a consistent display appearance.
- Defaults to
Return
- self:
Evision.Animation.t()
Python prototype (for reference only):
Animation([, loopCount[, bgColor]]) -> <Animation object>
@spec get_bgcolor(t()) :: Evision.scalar()
@spec get_frames(t()) :: [Evision.Mat.t()]
@spec get_still_image(t()) :: Evision.Mat.t()
@spec set_bgcolor(t(), Evision.scalar()) :: t()
@spec set_frames(t(), [Evision.Mat.maybe_mat_in()]) :: t()
@spec set_still_image(t(), Evision.Mat.maybe_mat_in()) :: t()