Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ebf06cd506e9
Choose a base ref
...
head repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7d1755487ec7
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Oct 1, 2020

  1. Copy the full SHA
    7d17554 View commit details
Showing with 4 additions and 3 deletions.
  1. +1 −1 lib
  2. +3 −2 src/glscopeclient/WaveformArea_rendering.cpp
5 changes: 3 additions & 2 deletions src/glscopeclient/WaveformArea_rendering.cpp
Original file line number Diff line number Diff line change
@@ -189,8 +189,9 @@ void WaveformArea::PrepareGeometry(WaveformRenderData* wdata, bool update_wavefo

//Scale alpha by zoom.
//As we zoom out more, reduce alpha to get proper intensity grading
//First order approximation of average sample length: use first sample's duration
float samplesPerPixel = 1.0f / (group->m_pixelsPerXUnit * pdat->m_timescale * pdat->m_durations[0]);
float capture_len_ps = pdat->m_offsets[pdat->m_offsets.size() - 1] * pdat->m_timescale;
float avg_sample_len = capture_len_ps / pdat->m_offsets.size();
float samplesPerPixel = 1.0f / (group->m_pixelsPerXUnit * avg_sample_len);
float alpha_scaled = alpha * 2 / samplesPerPixel;

//Config stuff