PolycodeImageEditor.h 582 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include "PolycodeEditor.h"
  3. #include <Polycode.h>
  4. using namespace Polycode;
  5. class PolycodeImageEditor : public PolycodeEditor {
  6. public:
  7. PolycodeImageEditor();
  8. virtual ~PolycodeImageEditor();
  9. bool openFile(String filePath);
  10. void Resize(int x, int y);
  11. protected:
  12. ScreenImage *grid;
  13. ScreenImage *editorImage;
  14. };
  15. class PolycodeImageEditorFactory : public PolycodeEditorFactory {
  16. public:
  17. PolycodeImageEditorFactory() : PolycodeEditorFactory() { extensions.push_back("png"); }
  18. PolycodeEditor *createEditor() { return new PolycodeImageEditor(); }
  19. };