OXYGENHUB
◆ main openmsx / src / video / SuperImposedFrame.hh
822 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 1
#ifndef SUPERIMPOSEDFRAME_HH
2
#define SUPERIMPOSEDFRAME_HH
3
4
#include "FrameSource.hh"
5
6
namespace openmsx {
7
8
/** This class represents a frame that is the (per-pixel) alpha-blend of
9
  * two other frames. When the two input frames have a different resolution.
10
  * The result will have the highest resolution of the two inputs (in other
11
  * words, the lower resolution frame gets upscaled to the higher resolution).
12
  */
13
class SuperImposedFrame final : public FrameSource
14
{
15
public:
16
	void init(const FrameSource* top, const FrameSource* bottom);
17
18
	[[nodiscard]] unsigned getLineWidth(unsigned line) const override;
19
	[[nodiscard]] std::span<const Pixel> getUnscaledLine(
20
		unsigned line, std::span<Pixel> helpBuf) const override;
21
22
private:
23
	const FrameSource* top;
24
	const FrameSource* bottom;
25
};
26
27
} // namespace openmsx
28
29
#endif