Derozer
(Derozer)
December 4, 2021, 3:42pm
#1
Hi there,
I’d like to know which are the variables/methods I need to replace for v2 on these stuff:
rack::settings::zoom // rack::settings::browserZoom? it seems different meaning...
APP->window->getLastFrameRate() // APP->window->getLastFrameDuration()?
Thanks
Not sure about getLastFrameRate, but for zoom, see this post from Andrew:
You can get the RackScrollWidget's zoom level with APP->scene->rackScroll->getZoom() and a similar setter. Zoom levels are linear, not exponential like settings::zoom.
Another purpose of zoom I’ve seen plugins use is conditional drawing of fine details to save CPU. For that, plugins should read the NanoVG state in draw() such as
float t[6];
nvgCurrentTransform(args.vg, t);
float zoom = t[3];
Derozer
(Derozer)
December 20, 2021, 2:10pm
#4
got them:
std::pow(2.0f, rack::settings::zoom);
become APP->scene->rackScroll->getZoom()
APP->window->getLastFrameRate()
become APP->window->getMonitorRefreshRate()
thanks