This commit is contained in:
Shaohua Tong 2019-12-18 12:28:07 +01:00
parent 14c1335881
commit 8fab19dd26
2 changed files with 3 additions and 6 deletions

View File

@ -5,6 +5,8 @@
#include "DrawRender.hpp"
#include <algorithm>
#include <unistd.h>
#include <thread>
#include <chrono>
DrawRender::DrawRender(int windowWidth, int windowHeight, vkvm::Color defaultBackgroundColor, vkvm::Color penColor, int penWidth)
: backgroundColor(defaultBackgroundColor), penColor(penColor) {
@ -125,11 +127,7 @@ void DrawRender::translateToSharedMemory(std::vector<std::vector<bool>> shape, i
currentY++;
}
// a violent way to delay redraw
for(y = 900; y < 1000; y++) {
for(x = 900; x < 1000; x++)
vkvm::setPixel(y, x, vkvm::Color(217,217,217));
}
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
void DrawRender::clearToSharedMemory(std::vector<std::vector<bool>> shape, int startX, int startY) {

View File

@ -8,7 +8,6 @@
#include <Color.hpp>
#include <vkvm.hpp>
#include <iostream>
#include "Font.h"
#include "vector"
#include "utils.hpp"
#include <cmath>