A rendered picture, rows top to bottom: indexed colour, one byte per pixel, or RGBA, four.
frame = Cauldron3D.Render.draw(view, polygons)
Cauldron3D.Frame.rgba(frame, palette)
Summary
Functions
overlay drawn over frame with its top left at {x, y}, its pixels of colour
clear left out; the parts outside the frame are cut off. A Cauldron3D.Texture
serves as an overlay too. On an RGBA frame the overlay is RGBA too, laid over by its
alpha, and clear is not used.
A frame of one colour.
The frame as RGB bytes: an indexed frame through palette.
The frame as RGBA bytes: an indexed frame through palette, 768 bytes of red, green and blue.
The frame scaled to {width, height} by taking the nearest pixel.
Types
@type t() :: %Cauldron3D.Frame{ format: :indexed | :rgba, height: pos_integer(), pixels: binary(), width: pos_integer() }
Functions
overlay drawn over frame with its top left at {x, y}, its pixels of colour
clear left out; the parts outside the frame are cut off. A Cauldron3D.Texture
serves as an overlay too. On an RGBA frame the overlay is RGBA too, laid over by its
alpha, and clear is not used.
@spec new(pos_integer(), pos_integer(), byte()) :: t()
A frame of one colour.
The frame as RGB bytes: an indexed frame through palette.
The frame as RGBA bytes: an indexed frame through palette, 768 bytes of red, green and blue.
@spec scale(t() | Cauldron3D.Texture.t(), pos_integer(), pos_integer()) :: t()
The frame scaled to {width, height} by taking the nearest pixel.