MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / panYpixelsFor

Function panYpixelsFor

src/gui/MainWindowHelpers.cpp:338–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338int panYpixelsFor(const SpectrumWidget* spectrum)
339{
340 if (!spectrum) {
341 return kDefaultPanYpixels;
342 }
343
344 const int ypix = spectrum->spectrumPixelHeight();
345 if (ypix < kMinPanYpixels) {
346 return kDefaultPanYpixels;
347 }
348 // FFT bins arrive as radio-encoded pixel positions, not full-precision dBm
349 // samples. Request render-device pixels and keep the historical 700 px
350 // floor so zoomed traces have sub-screen-pixel precision.
351 return std::max(radioPixelsFor(spectrum, ypix), kDefaultPanYpixels);
352}
353
354bool panPixelDimensionsReady(const SpectrumWidget* spectrum)
355{

Calls 2

radioPixelsForFunction · 0.85
spectrumPixelHeightMethod · 0.80

Tested by

no test coverage detected