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

Helper class to draw scalines. 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)
 Darken one pixel. More...
Pixel darken (Pixel p1, Pixel p2, unsigned factor)
 Darken and blend two pixels. More...

Detailed Description

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

Helper class to draw scalines.

Definition at line 43 of file Scanline.hh.

Constructor & Destructor Documentation

◆ Scanline()

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

Definition at line 193 of file

Member Function Documentation

◆ darken() [1/2]

template<class Pixel >
Pixel openmsx::Scanline< Pixel >::darken ( Pixel  p,
unsigned  factor 

Darken one pixel.

Typically used to implement drawBlank().

Definition at line 217 of file

◆ darken() [2/2]

template<class Pixel >
Pixel openmsx::Scanline< Pixel >::darken ( Pixel  p1,
Pixel  p2,
unsigned  factor 

Darken and blend two pixels.

Definition at line 223 of file

◆ draw()

template<class 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 200 of file

References openmsx::x.

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