15template<std::
unsigned_
integral Pixel>
class Multiply;
21 void setFactor(
unsigned f);
22 [[nodiscard]]
inline uint16_t multiply(uint16_t p,
unsigned factor)
const;
23 [[nodiscard]]
inline uint16_t multiply(uint16_t p)
const;
24 [[nodiscard]]
inline std::span<const uint16_t, 0x10000>
getTable()
const {
return tab; }
28 std::array<uint16_t, 0x10000> tab = {};
35 void setFactor(
unsigned f);
36 [[nodiscard]]
inline uint32_t multiply(uint32_t p,
unsigned factor)
const;
37 [[nodiscard]]
inline uint32_t multiply(uint32_t p)
const;
45template<std::
unsigned_
integral Pixel>
class Scanline
58 void draw(std::span<const Pixel> src1, std::span<const Pixel> src2,
59 std::span<Pixel> dst,
unsigned factor);
std::span< const uint16_t, 0x10000 > getTable() const
Helper class to perform 'pixel x scalar' calculations.
Helper class to draw scanlines.
void draw(std::span< const Pixel > src1, std::span< const Pixel > src2, std::span< Pixel > dst, unsigned factor)
Draws a scanline.
Pixel darken(Pixel p, unsigned factor) const
Darken one pixel.
Scanline(const PixelOperations< Pixel > &pixelOps)
This file implemented 3 utility functions: