SuperImposedFrame.hh 832 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef SUPERIMPOSEDFRAME_HH
  2. #define SUPERIMPOSEDFRAME_HH
  3. #include "FrameSource.hh"
  4. #include <memory>
  5. namespace openmsx {
  6. /** This class represents a frame that is the (per-pixel) alpha-blend of
  7. * two other frames. When the two input frames have a different resolution.
  8. * The result will have the highest resolution of the two inputs (in other
  9. * words, the lower resolution frame gets upscaled to the higher resolution).
  10. */
  11. class SuperImposedFrame : public FrameSource
  12. {
  13. public:
  14. static std::unique_ptr<SuperImposedFrame> create(
  15. const PixelFormat& format);
  16. void init(const FrameSource* top, const FrameSource* bottom);
  17. virtual ~SuperImposedFrame() = default;
  18. protected:
  19. explicit SuperImposedFrame(const PixelFormat& format);
  20. const FrameSource* top;
  21. const FrameSource* bottom;
  22. };
  23. } // namespace openmsx
  24. #endif