Scenic.Assets.Stream.Bitmap.build
You're seeing just the function
build
, go back to Scenic.Assets.Stream.Bitmap module for more information.
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
Depth | Bytes per pixel | Notes |
---|---|---|
:g | 1 | Simple Greyscale. 256 shades of grey |
:ga | 2 | Greyscale plus an alhpa channel |
:rgb | 3 | Red/Green/Blue Millions of colors |
:rgba | 4 | Red/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.