|
|
@ -125,11 +125,10 @@ int main(int argc, char *argv[]) { |
|
|
|
SFMLRender renderer; |
|
|
|
SFMLRender renderer; |
|
|
|
|
|
|
|
|
|
|
|
if(renderer.resize_grid(10, panel)) { |
|
|
|
if(renderer.resize_grid(10, panel)) { |
|
|
|
println("RESIZED: {},{}", panel.width, panel.height); |
|
|
|
|
|
|
|
// set canvas to best size
|
|
|
|
|
|
|
|
drawing = Canvas(panel.width * 2, panel.height * 4); |
|
|
|
drawing = Canvas(panel.width * 2, panel.height * 4); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
panel.set_renderer(Renderer([&]{ |
|
|
|
panel.set_renderer(Renderer([&]{ |
|
|
|
for(size_t x = 0; x < colors.size(); x++) { |
|
|
|
for(size_t x = 0; x < colors.size(); x++) { |
|
|
|
for(size_t y = 0; y < colors[0].size(); y++) { |
|
|
|
for(size_t y = 0; y < colors[0].size(); y++) { |
|
|
@ -153,7 +152,7 @@ int main(int argc, char *argv[]) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
std::this_thread::sleep_for(10ms); |
|
|
|
std::this_thread::sleep_for(100ms); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|