Scenic.Assets.Stream.Bitmap.build

You're seeing just the function build, go back to Scenic.Assets.Stream.Bitmap module for more information.
Link to this function

build(format, width, height, opts \\ [])

View Source

Specs

build(
  depth :: depth(),
  width :: pos_integer(),
  height :: pos_integer(),
  opts :: Keyword.t()
) :: t()

Build a new bitmap with a given depth, width and height.

Build creates a new bitmap in memory. It begins in a mutable state and will be set to transparent black unless the :clear option is specified.

The valid depths are :g, :ga, :rgb, :rgba as explained in the following table

DepthBytes per pixelNotes
:g1Simple Greyscale. 256 shades of grey
:ga2Greyscale plus an alhpa channel
:rgb3Red/Green/Blue Millions of colors
:rgba4Red/Green/Blue/Alpha

Options

  • :clear Set the new bitmap so that every pixel is the specified color.
  • :commit Set to true to start the bitmap committed. Set to false for mutable. The default if not specified is mutable.