Scenic.Assets.Stream.Bitmap.clear

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

Specs

clear(mutable :: m(), color :: Scenic.Color.t()) :: mutable :: m()

Set the color value of all pixels in a bitmap. This effectively erases the bitmap, replacing it with a solid field of the supplied color.

Only works with mutable bitmaps.

The color you provide can be any valid value from the Scenic.Color module.

If the color you provide doesn't match the depth of the bitmap, this will transform the color as appropriate to fit. For example, putting an :rgb color into a :g (greyscale) bit map, will set the level of grey to be the average value of the red, green, and blue channels of the supplied color