To mitigate concurrent rendering, the waveform cache adds a random range of pixels centered around the visible waveform. Alignment is using integer half_width = width_samples / 2; This always aligns the left-edge to the left-most cairo-pixel. This fixes an issue with moving moiree patterns in waveforms when zooming vertically (which invalidates the cache and uses a different random number of pixels),