12using Pixel = uint32_t;
28 return std::max(tWidth, bWidth);
32 unsigned line, std::span<Pixel> helpBuf)
const
38 auto width = std::min(std::max<size_t>(tWidth, bWidth),
41 auto tBuf = helpBuf.subspan(0, width);
43 auto tLine = top ->
getLine(narrow<int>(tNum), tBuf);
44 auto bLine = bottom->
getLine(narrow<int>(bNum), bBuf);
Interface for getting lines from a video frame.
std::span< const Pixel > getLine(int line, std::span< Pixel > buf) const
Gets a pointer to the pixels of the given line number.
virtual unsigned getLineWidth(unsigned line) const =0
Gets the number of display pixels on the given line.
void setHeight(unsigned height_)
unsigned getHeight() const
Gets the number of lines in this frame.
void init(const FrameSource *top, const FrameSource *bottom)
unsigned getLineWidth(unsigned line) const override
Gets the number of display pixels on the given line.
std::span< const Pixel > getUnscaledLine(unsigned line, std::span< Pixel > helpBuf) const override
Get a specific line, with the 'native' line-width.
This file implemented 3 utility functions:
void alphaBlendLines(std::span< const Pixel > in1, std::span< const Pixel > in2, std::span< Pixel > out)
AlphaBlendLines functor Generate an output line that is a per-pixel-alpha-blend of the two input line...
CharacterConverter::Pixel Pixel