MCPcopy Create free account
hub / github.com/DISTRHO/DPF / getScaleFactor

Function getScaleFactor

dgl/src/WindowPrivateData.cpp:61–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59// -----------------------------------------------------------------------
60
61static double getScaleFactor(const PuglView* const view)
62{
63 // allow custom scale for testing
64 if (const char* const scale = getenv("DPF_SCALE_FACTOR"))
65 return std::max(1.0, std::atof(scale));
66
67 if (view != nullptr)
68 return puglGetScaleFactor(view);
69
70 return 1.0;
71}
72
73static PuglView* puglNewViewWithTransientParent(PuglWorld* const world, PuglView* const transientParentView)
74{

Callers 1

PrivateDataMethod · 0.70

Calls 1

puglGetScaleFactorFunction · 0.50

Tested by

no test coverage detected