View Source Evision.Animation (Evision v0.2.16-pre.2)

Summary

Types

t()

Type that represents an Animation struct.

Types

@type t() :: %Evision.Animation{ref: reference()}

Type that represents an Animation struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec animation() :: 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 to 0 (infinite looping) to maintain valid bounds.
  • bgColor: Evision.scalar().

    A Scalar object 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.
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 to 0 (infinite looping) to maintain valid bounds.
  • bgColor: Evision.scalar().

    A Scalar object 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.
Return
  • self: Evision.Animation.t()

Python prototype (for reference only):

Animation([, loopCount[, bgColor]]) -> <Animation object>
@spec get_bgcolor(t()) :: Evision.scalar()
@spec get_durations(t()) :: [integer()]
@spec get_frames(t()) :: [Evision.Mat.t()]
@spec get_loop_count(t()) :: integer()
@spec get_still_image(t()) :: Evision.Mat.t()
@spec set_bgcolor(t(), Evision.scalar()) :: t()
Link to this function

set_durations(self, prop)

View Source
@spec set_durations(t(), [integer()]) :: t()
@spec set_frames(t(), [Evision.Mat.maybe_mat_in()]) :: t()
Link to this function

set_loop_count(self, prop)

View Source
@spec set_loop_count(t(), integer()) :: t()
Link to this function

set_still_image(self, prop)

View Source
@spec set_still_image(t(), Evision.Mat.maybe_mat_in()) :: t()