DoubledFrame.hh 744 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef DOUBLEDFRAME_HH
  2. #define DOUBLEDFRAME_HH
  3. #include "FrameSource.hh"
  4. namespace openmsx {
  5. /** Produces a video frame that has every line from the input frame twice
  6. * plus a number of black lines at the top.
  7. * This class does not copy the data from the input FrameSource.
  8. */
  9. class DoubledFrame final : public FrameSource
  10. {
  11. public:
  12. explicit DoubledFrame(const PixelFormat& format);
  13. void init(FrameSource* field, unsigned skip);
  14. private:
  15. unsigned getLineWidth(unsigned line) const override;
  16. const void* getLineInfo(
  17. unsigned line, unsigned& width,
  18. void* buf, unsigned bufWidth) const override;
  19. /** The original frame whose data will be doubled.
  20. */
  21. FrameSource* field;
  22. unsigned skip;
  23. };
  24. } // namespace openmsx
  25. #endif