Scenic.Primitive.Style.Paint.Stream (Scenic v0.11.0-beta.0) View Source

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

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.