Public Member Functions | List of all members
openmsx::Scanline< Pixel > Class Template Reference

Helper class to draw scanlines. More...

#include <Scanline.hh>

Public Member Functions

 Scanline (const PixelOperations< Pixel > &pixelOps)
void draw (const Pixel *src1, const Pixel *src2, Pixel *dst, unsigned factor, size_t width)
 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...

Detailed Description

template<std::unsigned_integral Pixel>
class openmsx::Scanline< Pixel >

Helper class to draw scanlines.

Definition at line 44 of file Scanline.hh.

Constructor & Destructor Documentation

◆ Scanline()

template<std::unsigned_integral Pixel>
openmsx::Scanline< Pixel >::Scanline ( const PixelOperations< Pixel > &  pixelOps)

Definition at line 194 of file

Member Function Documentation

◆ darken() [1/2]

template<std::unsigned_integral Pixel>
Pixel openmsx::Scanline< Pixel >::darken ( Pixel  p,
unsigned  factor 
) const

Darken one pixel.

Typically used to implement drawBlank().

Definition at line 218 of file

◆ darken() [2/2]

template<std::unsigned_integral Pixel>
Pixel openmsx::Scanline< Pixel >::darken ( Pixel  p1,
Pixel  p2,
unsigned  factor 
) const

Darken and blend two pixels.

Definition at line 224 of file

◆ draw()

template<std::unsigned_integral Pixel>
void openmsx::Scanline< Pixel >::draw ( const Pixel src1,
const Pixel src2,
Pixel dst,
unsigned  factor,
size_t  width 

Draws a scanline.

The scanline will be the average of the two input lines and darkened by a certain factor.

src1First input line.
src2Second input line.
dstOutput line.
factorDarkness factor, 0 means completely black, 255 means no darkening.
widthLine width in pixels.

Definition at line 201 of file

References openmsx::x, and xrange().

The documentation for this class was generated from the following files: