// // Created by shaohuatong on 21.11.19. // #ifndef SIMPLE_DRAW_DRAWRENDER_HPP #define SIMPLE_DRAW_DRAWRENDER_HPP #include #include #include #include #include "Font.h" #include "vector" #define CIRCLE 0 #define SQUARE 1 #define BRUSH 2 class DrawRender { public: DrawRender(int windowWidth, int windowHeight, vkvm::Color defaultBackgroundColor, vkvm::Color penColor, int penWidth); void setType(); void update(vkvm::Coordinates mousePosition, int type); void clear(); private: vkvm::Coordinates mousePosition; vkvm::Color backgroundColor; vkvm::Color penColor; int type; int penWidth; int windowWidth; int windowHeight; int graphicsHeight; int graphicsWidth; int radius; int startX; int startY; bool turnOnBrush; std::vector> circleAndSquareCreator(vkvm::Coordinates mousePosition, int type); std::vector> brushCreator(vkvm::Coordinates mousePosition); int squareOfDistance(vkvm::Coordinates x, vkvm::Coordinates y); void translateToSharedMemory(std::vector> graphics, int startX, int startY, int Type); }; #endif //SIMPLE_DRAW_DRAWRENDER_HPP