view.Render();
scr.Present();
sleep(5);
+ scr.RenderBMP(input);
+ view.Render();
scr.ScreenShot(output);
}
{
View view(doc,bounds, c);
Screen scr;
+ scr.DebugFontInit("DejaVuSansMono.ttf");
scr.SetMouseHandler([&](int x, int y, int buttons, int wheel) // [?] wtf
{
static bool oldButtonDown = false;
}
);
+ double init_time = SDL_GetPerformanceCounter();
while (scr.PumpEvents())
{
scr.Clear();
view.Render();
+ scr.DebugFontPrintF("[CPU] Render took %lf ms (%lf FPS)\n", (SDL_GetPerformanceCounter() - init_time)* 1000.0/SDL_GetPerformanceFrequency(), SDL_GetPerformanceFrequency()/(SDL_GetPerformanceCounter() - init_time));
+ scr.DebugFontPrintF("View bounds: (%f, %f) - (%f, %f)\n", view.GetBounds().x, view.GetBounds().y, view.GetBounds().w, view.GetBounds().h);
scr.Present();
+ init_time = SDL_GetPerformanceCounter();
}
}