openMSX
|
Helper class to draw scanlines. More...
#include <Scanline.hh>
Public Member Functions | |
Scanline (const PixelOperations< Pixel > &pixelOps) | |
void | draw (std::span< const Pixel > src1, std::span< const Pixel > src2, std::span< Pixel > dst, unsigned factor) |
Draws a scanline. More... | |
Pixel | darken (Pixel p, unsigned factor) const |
Darken one pixel. More... | |
Pixel | darken (Pixel p1, Pixel p2, unsigned factor) const |
Darken and blend two pixels. More... | |
Helper class to draw scanlines.
Definition at line 45 of file Scanline.hh.
|
explicit |
Definition at line 183 of file Scanline.cc.
Pixel openmsx::Scanline< Pixel >::darken | ( | Pixel | p, |
unsigned | factor | ||
) | const |
Darken one pixel.
Typically used to implement drawBlank().
Definition at line 211 of file Scanline.cc.
Pixel openmsx::Scanline< Pixel >::darken | ( | Pixel | p1, |
Pixel | p2, | ||
unsigned | factor | ||
) | const |
Darken and blend two pixels.
Definition at line 217 of file Scanline.cc.
void openmsx::Scanline< Pixel >::draw | ( | std::span< const Pixel > | src1, |
std::span< const Pixel > | src2, | ||
std::span< Pixel > | dst, | ||
unsigned | factor | ||
) |
Draws a scanline.
The scanline will be the average of the two input lines and darkened by a certain factor.
src1 | First input line. |
src2 | Second input line. |
dst | Output line. |
factor | Darkness factor, 0 means completely black, 255 means no darkening. |
Definition at line 190 of file Scanline.cc.
References utf8::unchecked::size(), and xrange().