View Source Scenic.Primitive.Style.Paint.Stream (Scenic v0.11.2)

Fill a primitive with an image or bitmap from Scenic.Assets.Stream

data-format

Data Format

{:stream, key}

Fill with the static image indicated by key

This example fills a rect with the contents of the "color_cycle" stream. When the source of the stream updates the bitmap it contains, the rect's fill will automatically be updated.

Graph.build()
  |> rect( {100, 50}, fill: {:stream, "color_cycle"} )

See the documentation for Scenic.Assets.Stream for more information on how to create and manage streams.